Skip to content

Change MIME type coming from S3 #69

Answered by dekobon
dav-pascual asked this question in Q&A
Discussion options

You must be logged in to vote

I believe that the gateway is just passing along the MIME type as provided by S3. Typically, the preferred approach is to set the correct mime type by setting the Content-Type header in S3 and then the gateway will pass it along in the same way. The same is true for the Content-Disposition header which informs the browser to either display or download a file.

See the AWS docs here.

Also, you could modify the headers by using one of the NGINX proxy_* directives to modify the HTTP headers.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@dav-pascual
Comment options

@ehginanjar
Comment options

@ehginanjar
Comment options

Answer selected by dav-pascual
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #66 on November 17, 2022 00:34.