Skip to content

Commit

Permalink
Add Content-Type header to presigned url example (#2061)
Browse files Browse the repository at this point in the history
* Add Content-Type header to presigned url example

Prevents the main presigned url example from failing in many cases, as the browser does not assign a content type in many cases, but a content type is required by S3. Based on issue #1233

* docs: code style

Co-authored-by: Renée Kooi <[email protected]>
  • Loading branch information
scherroman and goto-bus-stop authored Feb 12, 2020
1 parent 4a7fc46 commit 68639c2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion website/src/docs/aws-s3.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,11 @@ uppy.use(AwsS3, {
return {
method: data.method,
url: data.url,
fields: data.fields
fields: data.fields,
// Provide content type header required by S3
headers: {
'Content-Type': file.type
}
}
})
}
Expand Down

0 comments on commit 68639c2

Please sign in to comment.