2016-04-29 79 views
0

我使用aws s3來存儲文件。我正在使用ngUpload與我的存儲桶名稱和我的憑證,如下所示。如何列出上傳的文件到亞馬遜s3

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 
       } 

我可以上傳文件,但如何通過http.get要求從angularjs部分

+0

get端點的響應格式是什麼? –

+0

當使用授權,日期和x-amz日期標頭獲得與郵遞員的請求時我得到SignatureDoesNotMatch,但具有相同的參數我可以上傳文件 – cimey

回答