asayler / COG-Web

Web Frontend for COG
GNU Affero General Public License v3.0
2 stars 3 forks source link

Non-text Files Fail to Download in Submission View #26

Closed asayler closed 8 years ago

asayler commented 8 years ago

Steps to reproduce:

  1. Submit a non-text file (png, jpg, etc)
  2. Go to the corresponding submission view
  3. Download the file

The downloaded file will be larger than the submission file and will not match.

hexacyanide commented 8 years ago

I have a hunch that this is a MIME-type issue (potentially this), 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).

Would appreciate feedback/verification tests on f366711bee1770faf4bffd134ac7e56dc6859c6a.

taylorjandrews commented 8 years ago

I tested f366711bee1770faf4bffd134ac7e56dc6859c6a and can verify it's working for images, pdfs, and text documents. Could you submit a pull request for your changes?

asayler commented 8 years ago

I made a comment in #27, but I'm getting an auth prompt when I try to click the download links in Chrome. Are neither of you encountering that?