Open Geminii opened 4 years ago
Hi @Geminii and @rowanwins , I faced the same problem when getting a signed url (operation: putObject) using AWS Javascript SDK. FYR: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#getSignedUrl-property
After looking into this issue, my understandings are:
postEndpoint
) using POST method.Here is the idea to get things work:
putEndpoint
rather than postEndpoint
PUT
the file
rather than POST
the fd
i.e. form data that wraps the file
For instance:
// urlsigner.js - line 59
request.open('PUT', response.putEndpoint);
// urlsigner.js - line 85
request.send(file);
I'll try to implement the above solution in the next couple of days, will update the result here. 🤞
Hi @Geminii and @rowanwins, I did a PoC and it kind of works except the response has a non-201 status code.
I reckon adding success_action_status: 201
to URL signer's response will resolve the issue.
Here is code of my PoC (I know it's not perfect, so I'm not going to create any PR)
Finally, I'd recommend this article which discuss the difference between PUT and POST pre-signed url pretty well.
Hi :)
I followed the getting started to integrate it into my project . Code looks like :
Problem : Upload of my file (pdf, png) works and is present on my S3 bucket but when i try to download it, the file is always corrupted/damaged :( How can i fix it ? Did i miss something into the configuration ?
The call on
http://localhost:9999/scan/signedUrl
return :Thanks a lot for your help :) Thanks for this great intregration of DropzoneJs.