Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ajax call with pre-signed URL giving error
#3
(09-09-2018, 11:17 AM)fzs Wrote:
(09-09-2018, 01:02 AM)phanikumar Wrote: I have created a simple html page which contains an ajax call to API endpoint to retrieve pre-signed URL. Using the URL retrieved from the previous ajax call, I tried upload a sample text file which is resulting in the request signature we calculated does not match the signature you provided. Check your key and signing method response. But when I am using the same URL using CURL, it is working Good. Can someone suggest me what I am missing in the request.

When you are sending the upload, are you also using Authorization Header method at the same time as the URL query method (pre-signed) to send the signature? You shouldn't if you are. My question is referring to this: https://docs.aws.amazon.com/general/late...quest.html

My other recommendation would be to use the SDKs to let the signature handling process be done automatically for you without worrying about security and signing issues.
I am not using authorization headers. I am using the entire signed URL to make the Request. Also I do agree that using SDK is a good choice. But I have a situation where my code sits on Lambda function which has limitation of 6MB for file size and API Gateway has 10MB Payload limit. My files are too large and I can't handle that through Lambda and API Gateway. I am checking the possible ways to handle this. One other option that I am focusing on is multi-part upload. But I would like to get implement both to see the performance difference and advantages. I have attached the code for this forum which I am using to upload the code. Can you please have a look at the code and let me know if I am missing something


Attached Files
.html   S3.html (Size: 1.53 KB / Downloads: 522)
Reply


Messages In This Thread
RE: Ajax call with pre-signed URL giving error - by phanikumar - 09-09-2018, 11:47 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)