Skip to content

Commit

Permalink
FIO-6859: update-s3-to-accept-headers-from-signer-presign (#5337)
Browse files Browse the repository at this point in the history
* Loops over the headers that have been sent from server at src/storage/s3/aws.js signed.presigned()

* Need to be updated in light of https://github.com/formio/formio-server/pull/1336\#discussion_r1333648380 discussion

---------

Co-authored-by: ryaneggz <[email protected]>
  • Loading branch information
ryanformio and ryaneggz authored Oct 4, 2023
1 parent 857f68c commit 640ffd7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/providers/storage/s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ const s3 = (formio) => ({
response.data.key = XHR.path([response.data.key, dir, fileName]);
if (response.signed) {
xhr.openAndSetHeaders('PUT', response.signed);
xhr.setRequestHeader('Content-Type', file.type);
Object.keys(response.data.headers).forEach(key => {
xhr.setRequestHeader(key, response.data.headers[key]);
});
return file;
}
else {
Expand Down

0 comments on commit 640ffd7

Please sign in to comment.