[英]How to list uploaded files to amazon s3
I use aws s3 to store files. 我使用aws s3来存储文件。 I am using ngUpload with my bucket name and my credentials like below.
我将ngUpload与存储桶名称和凭据一起使用,如下所示。
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 我可以上传文件,但是如何通过angular.js部分的http.get请求列出上传的文件
I think the solution provided in this thread will be useful to you. 我认为此线程中提供的解决方案将对您有用。 Amazon S3 Signature Does Not Match - AWS SDK Java
Amazon S3签名不匹配-AWS开发工具包Java
Hope it helps. 希望能帮助到你。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.