{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/12546","labels_url":"https://api.github.com/repos/owncloud/core/issues/12546/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/12546/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/12546/events","html_url":"https://github.com/owncloud/core/pull/12546","id":50649751,"number":12546,"title":"Send the mime icon if we can't generate a preview","user":{"login":"oparoz","id":323220,"avatar_url":"https://avatars.githubusercontent.com/u/323220?v=3","gravatar_id":"","url":"https://api.github.com/users/oparoz","html_url":"https://github.com/oparoz","followers_url":"https://api.github.com/users/oparoz/followers","following_url":"https://api.github.com/users/oparoz/following{/other_user}","gists_url":"https://api.github.com/users/oparoz/gists{/gist_id}","starred_url":"https://api.github.com/users/oparoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oparoz/subscriptions","organizations_url":"https://api.github.com/users/oparoz/orgs","repos_url":"https://api.github.com/users/oparoz/repos","events_url":"https://api.github.com/users/oparoz/events{/privacy}","received_events_url":"https://api.github.com/users/oparoz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/3%20-%20To%20Review","name":"3 - To Review","color":"ededed"},{"url":"https://api.github.com/repos/owncloud/core/labels/feature:previews","name":"feature:previews","color":"d4c5f9"}],"state":"open","locked":false,"assignee":{"login":"oparoz","id":323220,"avatar_url":"https://avatars.githubusercontent.com/u/323220?v=3","gravatar_id":"","url":"https://api.github.com/users/oparoz","html_url":"https://github.com/oparoz","followers_url":"https://api.github.com/users/oparoz/followers","following_url":"https://api.github.com/users/oparoz/following{/other_user}","gists_url":"https://api.github.com/users/oparoz/gists{/gist_id}","starred_url":"https://api.github.com/users/oparoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oparoz/subscriptions","organizations_url":"https://api.github.com/users/oparoz/orgs","repos_url":"https://api.github.com/users/oparoz/repos","events_url":"https://api.github.com/users/oparoz/events{/privacy}","received_events_url":"https://api.github.com/users/oparoz/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/owncloud/core/milestones/31","html_url":"https://github.com/owncloud/core/milestones/8.1-current","labels_url":"https://api.github.com/repos/owncloud/core/milestones/31/labels","id":912160,"number":31,"title":"8.1-current","description":"","creator":{"login":"MorrisJobke","id":245432,"avatar_url":"https://avatars.githubusercontent.com/u/245432?v=3","gravatar_id":"","url":"https://api.github.com/users/MorrisJobke","html_url":"https://github.com/MorrisJobke","followers_url":"https://api.github.com/users/MorrisJobke/followers","following_url":"https://api.github.com/users/MorrisJobke/following{/other_user}","gists_url":"https://api.github.com/users/MorrisJobke/gists{/gist_id}","starred_url":"https://api.github.com/users/MorrisJobke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MorrisJobke/subscriptions","organizations_url":"https://api.github.com/users/MorrisJobke/orgs","repos_url":"https://api.github.com/users/MorrisJobke/repos","events_url":"https://api.github.com/users/MorrisJobke/events{/privacy}","received_events_url":"https://api.github.com/users/MorrisJobke/received_events","type":"User","site_admin":false},"open_issues":93,"closed_issues":1390,"state":"open","created_at":"2014-12-22T12:04:01Z","updated_at":"2015-06-12T11:26:52Z","due_on":"2015-07-07T04:00:00Z","closed_at":null},"comments":61,"created_at":"2014-12-02T13:21:29Z","updated_at":"2015-06-12T11:31:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/owncloud/core/pulls/12546","html_url":"https://github.com/owncloud/core/pull/12546","diff_url":"https://github.com/owncloud/core/pull/12546.diff","patch_url":"https://github.com/owncloud/core/pull/12546.patch"},"body":"Sending an invalid OC_Image instance can lead to all sorts of unwanted side effects with 3rd party apps.\r\nThe first step to fix this would be to send the mime icon.\r\nLater on we could maybe generate a broken image to send back, to indicate that we were unsuccessful in generating a preview.\r\n\r\nIt's also possible for individual providers to do a better job by generating their own broken image, but I thought it would be best to have a global solution in place first.\r\n\r\nfix #14106"},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/111461725","html_url":"https://github.com/owncloud/core/pull/12546#issuecomment-111461725","issue_url":"https://api.github.com/repos/owncloud/core/issues/12546","id":111461725,"user":{"login":"oparoz","id":323220,"avatar_url":"https://avatars.githubusercontent.com/u/323220?v=3","gravatar_id":"","url":"https://api.github.com/users/oparoz","html_url":"https://github.com/oparoz","followers_url":"https://api.github.com/users/oparoz/followers","following_url":"https://api.github.com/users/oparoz/following{/other_user}","gists_url":"https://api.github.com/users/oparoz/gists{/gist_id}","starred_url":"https://api.github.com/users/oparoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oparoz/subscriptions","organizations_url":"https://api.github.com/users/oparoz/orgs","repos_url":"https://api.github.com/users/oparoz/repos","events_url":"https://api.github.com/users/oparoz/events{/privacy}","received_events_url":"https://api.github.com/users/oparoz/received_events","type":"User","site_admin":false},"created_at":"2015-06-12T11:31:26Z","updated_at":"2015-06-12T11:31:26Z","body":"There are 2 public API issues which needs to be sorted\r\n* clients need to receive a proper status code\r\n* there needs to be an endpoint serving icons (my guess). \r\n\r\nRegarding the WebGUI\r\n* we need the controllers to return proper error codes when they encounter a broken preview\r\n* we need @rullzer's PR https://github.com/owncloud/core/pull/16724 to be fixed and merged, so that the Web GUI can retrieve the icon when it gets an error code\r\n\r\nThat probably wont happen before 8.2\r\n\r\nIn the meantime, 2 things can happen:\r\n* API clients can check what they get and act accordingly\r\n* Preview could return an icon surrounded by empty space so that the dimension of the preview match the asked dimension. Should be dead easy to do."}}