Skip to content

Possible to set content-encoding header? #94

@chrisspen

Description

@chrisspen

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions