Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Mime Type returned #304

Closed
andrewmclagan opened this issue Sep 4, 2019 · 6 comments
Closed

Incorrect Mime Type returned #304

andrewmclagan opened this issue Sep 4, 2019 · 6 comments
Labels

Comments

@andrewmclagan
Copy link

andrewmclagan commented Sep 4, 2019

Describe the bug

When uploading a Microsoft Word doc such as .docx tusd returns an incorrect mime header of

content-type: application/octet-stream

should be

content-type: application/vnd.openxmlformats-officedocument.wordprocessingml.document

This actually occurs for many file types. It actually seems to modify the actual file. Once we download it again and check the mime locally on a linux box its reading it wrong...

To Reproduce
Can reproduced on https://uppy.io/examples/dashboard/

Expected behavior
correct mime header

@andrewmclagan
Copy link
Author

content-type: application/pdf

Pdfs word as expected

@Acconut
Copy link
Member

Acconut commented Sep 5, 2019

Good finding! We currently (incorrectly) don't allow dots in the values for the Content-Type header, causing tusd to fall back to the default type of application/octet-stream.

It actually seems to modify the actual file. Once we download it again and check the mime locally on a linux box its reading it wrong...

This should never happen. Can you confirm that the file content is different using checksums (e.g. md5 or sha1)?

Acconut added a commit that referenced this issue Sep 5, 2019
@andrewmclagan
Copy link
Author

I will reconfirm this is changing the checksum. Could be on our side.

@andrewmclagan
Copy link
Author

Yes they match. So thats all fine.

@Acconut

@Acconut
Copy link
Member

Acconut commented Sep 9, 2019

Great, thanks for checking! I am going to close this issue since the incorrect mime type was fixed in 852b6fa which will be included in the next release.

@Acconut Acconut closed this as completed Sep 9, 2019
@andrewmclagan
Copy link
Author

Thanks. Will use a custom image build until it’s realeased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants