0

I use aws s3 to store files. I am using ngUpload with my bucket name and my credentials like below.

uploader.upload({
                    url: 'https://<myBucket>.s3.amazonaws.com/', //S3 upload url including bucket name
                    method: 'POST',
                    fields: {
                        key: refId.toString() + "_" + file.name, // the key to store the file on S3, could be file name or customized
                        AWSAccessKeyId: 'mySecretKey',
                        acl: 'private', 
                        policy: 'myPolicy',
                        signature: 'mySignature',
                        "Content-Type": file.type != '' ? file.type : 'application/octet-stream', 
                        filename: file.name
                    },
                    file: file
                }

I can upload file but how to list uploaded files via http.get request from angularjs part

cimey
  • 189
  • 3
  • 10
  • what is the response format from get endpoint ? – Atul Nar Apr 29 '16 at 08:13
  • when making get request with postman only using Authorization,Date and x-amz-date headers I get SignatureDoesNotMatch, but with same parameters i can upload file – cimey Apr 29 '16 at 08:40

1 Answers1

0

I think the solution provided in this thread will be useful to you. Amazon S3 Signature Does Not Match - AWS SDK Java

Hope it helps.

Community
  • 1
  • 1
koolhead17
  • 1,944
  • 1
  • 12
  • 20