From 68639c2bb8e6d790d4c0bfc69ebdb9e222abd6b6 Mon Sep 17 00:00:00 2001 From: Roman Scher Date: Wed, 12 Feb 2020 08:52:57 -0500 Subject: [PATCH] Add Content-Type header to presigned url example (#2061) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 https://github.com/transloadit/uppy/issues/1233 * docs: code style Co-authored-by: Renée Kooi --- website/src/docs/aws-s3.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/website/src/docs/aws-s3.md b/website/src/docs/aws-s3.md index 3bb938c67..f0a0127ae 100644 --- a/website/src/docs/aws-s3.md +++ b/website/src/docs/aws-s3.md @@ -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 + } } }) }