You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been running into an issue for a while where Safari adds a 'txt' file extension to every downloaded file. I have tested this on macOS 10.13.X and 10.14.6 as well as iOS 13.3. The issue does not come up using Chrome or Firefox. My guess is that Safari's behaviour is due to the HTTP Content-Type response header being set to "text/plain".
How to reproduce
Upload a test file to the demo instance and download it using Safari. Inspect the downloaded file. It has a "txt" extension attached to it.
Possible remediation
The HTTP response header when downloading a file is set to Content-Type: text/plain. Changing it to Content-Type: application/octet-streammight fix this behaviour.
I would like to submit a pull request but could not find the settings in your source code. Sorry.
Thanks for all your work!
The text was updated successfully, but these errors were encountered:
Hi!
Thanks for reporting!
As far as I remember I decided not to put a mime type since I cannot be sure of the underlying file type. However I was not aware that the Wt library would put a "text/plain" mime type by default.
Hi @epoupon ,
I have been running into an issue for a while where Safari adds a 'txt' file extension to every downloaded file. I have tested this on macOS 10.13.X and 10.14.6 as well as iOS 13.3. The issue does not come up using Chrome or Firefox. My guess is that Safari's behaviour is due to the HTTP Content-Type response header being set to "text/plain".
How to reproduce
Upload a test file to the demo instance and download it using Safari. Inspect the downloaded file. It has a "txt" extension attached to it.
Possible remediation
The HTTP response header when downloading a file is set to
Content-Type: text/plain
. Changing it toContent-Type: application/octet-stream
might fix this behaviour.I would like to submit a pull request but could not find the settings in your source code. Sorry.
Thanks for all your work!
The text was updated successfully, but these errors were encountered: