I can generate a working presigned URL to list part of an S3 bucket's contents.
It works fine if I paste it in the browser or use hurl.it
However, in a jQuery Ajax GET call it fails on the signature.
I viewed the request in fiddler and it does append one parameter to the request which is presumably the callback.
I tried that in hurl.it and it also failed. It seems for Amazon Signature 4 the extra parameter added by Ajax is a show stopper.
I would pass it along to my server to be signed but unfortunately Ajax is after the fact so AFAIK it is impossible to specify the callback parameter ahead of time.
The odd thing is using the C# SDK to generate a presigned URL this extra parameter in Ajax is NOT a problem. But unfortunately the SDK does not provide a mechanism I am aware of for generating presigned URLs to LIST a buckets contents. Only to get an object.
So the presigned URL is not an issue. Nor is the headers as far as I can tell. It seems that it wants all the query parameters to match what I sign.
I have been at this for 2 days almost and I am so close yet so far.
Any insight from experienced s3 / ajax users would be sorely appreciated.
Thanks!
Aucun commentaire:
Enregistrer un commentaire