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

[s3boto] set the correct Content-Type for file #321

Closed
robinelvin opened this issue May 17, 2017 · 1 comment
Closed

[s3boto] set the correct Content-Type for file #321

robinelvin opened this issue May 17, 2017 · 1 comment
Labels

Comments

@robinelvin
Copy link

As with #303 / #320 the mime type and therefore Content-Type for files uploaded using the S3 handler defaults to application/octet-stream when the type cannot be guessed. Looking at the code it appears to me that content_type is guessed from the file extension.
I could be wrong here but from what I can gather this is what happens:
Passing in a content type to the _save() method of S3BotoStorage appears to be used but is not used when it reaches the write() method in S3BotoStorageFile where only the file extension is considered. My experience as a consumer of the storage backend is consistent with this observation.

@jschneier
Copy link
Owner

Fixed a while ago.

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

3 participants