rndme / download

file downloading using client-side javascript
MIT License
2.29k stars 418 forks source link

Newlines are not preserved in Firefox #80

Closed skylarmb closed 5 years ago

skylarmb commented 5 years ago

I am downloading a CSV file in Firefox. I can verify that the newlines are present in the response from my server and that the data being passed in to downloadjs is identical in all browsers, but downloading in Firefox results in corrupted CSV (no newlines) while chrome works fine.

skylarmb commented 5 years ago

Followup: Not sure what the issue is, but simply base64 encoding the file on the server and using download('data:text/csv;base64,... in the browser fixes it. Most likely an issue with newline encoding being treated differently by Firefox/Chrome...