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

content type for keys are hard-coded to application/octet-stream #2

Open
GoogleCodeExporter opened this issue Jun 25, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

I modified s3_util.py to use the mimetypes module:

top of file add:
from mimetypes import guess_type

and in s3_util.py _stream_data_from_file_

change:
headers['content-type'] = 'application/octet-stream'

to:
headers['content-type'] = guess_type(fileName)[0]

Original issue reported on code.google.com by stephen.mc on 29 Oct 2008 at 12:28

@GoogleCodeExporter
Copy link
Author

should actually be 

headers['content-type'] = guess_type(fileName)[0] or 'application/octet-stream'

Original comment by stephen.mc on 29 Oct 2008 at 2:25

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

No branches or pull requests

1 participant