steiza / docstore

For any civics-minded organization that needs a simple place to host documents publicly
http://a2docs.org/
7 stars 4 forks source link

500: Internal Server Error on download after upload #20

Closed vielmetti closed 8 years ago

vielmetti commented 8 years ago

See https://a2docs.aadl.org/view/408 especially

esp at the bottom

Download 3-16-2016 HDC Minutes with Live Links.pdf

where I get "500: Internal Server Error" as a response.

The three docs had been uploaded as a batch in a single transaction from the "upload" function on my Mac running Chrome.

vielmetti commented 8 years ago

This looks like it has something to do with how the file name is encoded on the page, as I was able to download it when I replace the "+" with " " throughout.

https://a2docs.aadl.org/file/408/3-16-2016+HDC+Minutes+with+Live+Links.pdf

vielmetti commented 8 years ago

I'm going to try to narrow down this issue, which I think has to do with a difference in file name encodings in the web application vs the file storage on the system.

vielmetti commented 8 years ago

@steiza is working on this at the moment. The related problem is encoding of unicode characters in file names.

steiza commented 8 years ago

Should be fixed by https://github.com/steiza/docstore/commit/7a68c9f3e07351a8b0bf20728d6992476f0250e3!

The urls were not un-encoded before looking on the file system, so it was looking for filename+with+spaces.txt instead of filename with spaces.txt.