jezdez / caniusepython3.com

A site to check if your Python project is compatible with Python 3
https://caniusepython3.com/
136 stars 18 forks source link

File uploads require the local filename to end in .txt #22

Closed acdha closed 10 years ago

acdha commented 10 years ago

File uploads on http://caniusepython3.com currently don't work in Firefox, Safari, or Chrome. It displays as a drop target, there are no JavaScript errors in the console but nothing happens when you drop files on the widget.

jezdez commented 10 years ago

Hm, can you check again? They work for me.

acdha commented 10 years ago

I confirmed that it was failing again but realized why: I had a file named "requirements.pip" which is silently ignored. If I rename it to "requirements.txt", it works.

jezdez commented 10 years ago

Huh, that's odd. That implies that the browser will only accept plain text files it knows about?

acdha commented 10 years ago

That's what it looks like. Perhaps the easiest solution would just be for the text/plain check to do something like call alert rather than simply skipping the file:

https://github.com/jezdez/caniusepython3.com/blob/f833dc011643101dbc8ce0f31435f008bd8f01a6/ciupy3/checks/templates/checks/check_form.html#L51-L53

acdha commented 10 years ago

Maybe something like https://github.com/jezdez/caniusepython3.com/pull/23?