I'm trying to do the following:
- generate a presigned-url so that any client may upload a file to S3, after requesting the url
- using the nodejs amazon sdk, download a file previously uploaded using setp 1.
In order to generate the signed url, I'm using this parameters:
{
Bucket: BucketName,
Key: uri,
Expires: 60,
ACL:'public-read',
ContentType: ContentType,
ContentLength: ContentLength
}
Then, using curl, POST the file to the url:
curl -v -T package.jar presignedurl
This uploads the file (with the caveat that I have to enable public PutObject on the bucket), otherwise access is denied.
Later, when I try to download the previous file using nodejs sdk, I get Access Denied.
If I go to the file directly using its url with a browser, I'm able to download it.
Any help will be greatly appreciated.
Aucun commentaire:
Enregistrer un commentaire