IO-3340 Resolve unenforced content-type
This commit is contained in:
@@ -67,11 +67,14 @@ export const uploadToS3 = async (
|
||||
}
|
||||
|
||||
//Key should be same as we provided to maintain backwards compatibility.
|
||||
const { presignedUrl: preSignedUploadUrlToS3, key: s3Key } = signedURLResponse.data.signedUrls[0];
|
||||
const { presignedUrl: preSignedUploadUrlToS3, key: s3Key, contentType } = signedURLResponse.data.signedUrls[0];
|
||||
|
||||
const options = {
|
||||
onUploadProgress: (e) => {
|
||||
if (onProgress) onProgress({ percent: (e.loaded / e.total) * 100 });
|
||||
},
|
||||
headers: {
|
||||
...contentType ? { "Content-Type": fileType } : {}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user