{"action":"created","issue":{"url":"https://api.github.com/repos/asayler/COG-Web/issues/26","repository_url":"https://api.github.com/repos/asayler/COG-Web","labels_url":"https://api.github.com/repos/asayler/COG-Web/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/asayler/COG-Web/issues/26/comments","events_url":"https://api.github.com/repos/asayler/COG-Web/issues/26/events","html_url":"https://github.com/asayler/COG-Web/issues/26","id":144164899,"number":26,"title":"Non-text Files Fail to Download in Submission View","user":{"login":"asayler","id":308157,"avatar_url":"https://avatars.githubusercontent.com/u/308157?v=3","gravatar_id":"","url":"https://api.github.com/users/asayler","html_url":"https://github.com/asayler","followers_url":"https://api.github.com/users/asayler/followers","following_url":"https://api.github.com/users/asayler/following{/other_user}","gists_url":"https://api.github.com/users/asayler/gists{/gist_id}","starred_url":"https://api.github.com/users/asayler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asayler/subscriptions","organizations_url":"https://api.github.com/users/asayler/orgs","repos_url":"https://api.github.com/users/asayler/repos","events_url":"https://api.github.com/users/asayler/events{/privacy}","received_events_url":"https://api.github.com/users/asayler/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/asayler/COG-Web/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-29T05:58:53Z","updated_at":"2016-03-30T00:08:47Z","closed_at":null,"body":"Steps to reproduce:\r\n\r\n1. Submit a non-text file (png, jpg, etc)\r\n2. Go to the corresponding submission view\r\n3. Download the file\r\n\r\nThe downloaded file will be larger than the submission file and will not match.\r\n"},"comment":{"url":"https://api.github.com/repos/asayler/COG-Web/issues/comments/203164526","html_url":"https://github.com/asayler/COG-Web/issues/26#issuecomment-203164526","issue_url":"https://api.github.com/repos/asayler/COG-Web/issues/26","id":203164526,"user":{"login":"hexacyanide","id":2388198,"avatar_url":"https://avatars.githubusercontent.com/u/2388198?v=3","gravatar_id":"","url":"https://api.github.com/users/hexacyanide","html_url":"https://github.com/hexacyanide","followers_url":"https://api.github.com/users/hexacyanide/followers","following_url":"https://api.github.com/users/hexacyanide/following{/other_user}","gists_url":"https://api.github.com/users/hexacyanide/gists{/gist_id}","starred_url":"https://api.github.com/users/hexacyanide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hexacyanide/subscriptions","organizations_url":"https://api.github.com/users/hexacyanide/orgs","repos_url":"https://api.github.com/users/hexacyanide/repos","events_url":"https://api.github.com/users/hexacyanide/events{/privacy}","received_events_url":"https://api.github.com/users/hexacyanide/received_events","type":"User","site_admin":false},"created_at":"2016-03-30T00:08:47Z","updated_at":"2016-03-30T00:08:47Z","body":"I have a hunch that this is a MIME-type issue (potentially [this](https://github.com/asayler/COG-Web/blob/master/js/submission.js#L75)), but I did not verify this because the download did not work at all on my machine (Chrome 49.0.2623.87, W8.1). I instead simplified the download in such a way that the file is not downloaded again on page reload, and the file is not loaded into memory before downloading (this would cause problems with larger files).\r\n\r\nWould appreciate feedback."}}