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

Possible to set content-encoding header? #94

Open
chrisspen opened this issue Aug 31, 2024 · 0 comments
Open

Possible to set content-encoding header? #94

chrisspen opened this issue Aug 31, 2024 · 0 comments

Comments

@chrisspen
Copy link

I don't see any obvious way to do this, but is it possible to set the "content-encoding" header?

I want to upload gzip compressed files, and in order to be served correctly from CloudFront, the S3 file must have "content-type=gzip" set. It can't infer this from the file or file key.

Looking through the code, I don't see any easy way to add this. I was thinking maybe modifying _get_upload_args(), to add a check of the content using magic, but that method doesn't have access to the actual file contents.

I know whether or not it's gzipped from my application code. Is there any way to extend the fs.write() method to accept some sort of "headers" or "content_encoding" parameter?

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

No branches or pull requests

1 participant