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

automatically set Content-Type based on file type on S3 object upload #18

Open
jamesabel opened this issue May 16, 2024 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@jamesabel
Copy link
Owner

Currently when a file is uploaded to an S3 bucket, the "Content-Type" is “binary/octet-stream”.

For some file types this is not ideal. For example, for a PDF to be viewed in the browser (as opposed to being downloaded), the "Content-Type" must be set to "application/pdf”.

The enhancement is:
For known file types (e.g., based on their filename extension), set the "Content-Type" to an appropriate value for that file type.

See the "ExtraArgs" parameter in boto3 upload on how to set "Content-Type".

@jamesabel jamesabel added the enhancement New feature or request label May 16, 2024
@jamesabel jamesabel self-assigned this May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant