Uppy: Excel uploads to S3 set with content-type: application/zip

Created on 26 Mar 2018  路  1Comment  路  Source: transloadit/uppy

Uppy sets .xls filetypes as application/zip.
Code.
When uploading to S3 this sets the content-type as application/zip in S3.
The issue is that when a user downloads this file from S3 (using chrome) it will download the file as a zip, and it is unclear how to transform back to an excel file, resulting in a poor user experience.

Additional info
Aparrently xls files are ziped xml files under the hood.
Firefox correctly detects the file as a .xls
Related discussion

I'm not sure if there's a workaround at uppy's end. Has anyone else encountered this problem?

Bug

Most helpful comment

Thanks for the report! This is indeed because Uppy tries to be smarter than the browser, using file-type to detect file types. We've been thinking of removing it and just trust the browser generally, while hardcoding cases where the browser is wrong (.avi on macos is one such case IIRC), and this is another issue in favour of that! I'll update #294 to remove it.

>All comments

Thanks for the report! This is indeed because Uppy tries to be smarter than the browser, using file-type to detect file types. We've been thinking of removing it and just trust the browser generally, while hardcoding cases where the browser is wrong (.avi on macos is one such case IIRC), and this is another issue in favour of that! I'll update #294 to remove it.

Was this page helpful?
0 / 5 - 0 ratings