2016-04-29 73 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

回答