【问题标题】:How to list uploaded files to amazon s3如何将上传的文件列出到亚马逊 s3
【发布时间】:2016-04-29 08:06:37
【问题描述】:

我使用 aws s3 来存储文件。我正在使用带有我的存储桶名称和凭据的 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
                }

我可以上传文件,但是如何通过 angularjs 部分的 http.get 请求列出上传的文件

【问题讨论】:

  • get 端点的响应格式是什么?
  • 当仅使用 Authorization、Date 和 x-amz-date 标头向邮递员发出获取请求时,我得到 SignatureDoesNotMatch,但使用相同的参数我可以上传文件

标签: angularjs amazon-s3


【解决方案1】:

我认为此线程中提供的解决方案对您有用。 Amazon S3 Signature Does Not Match - AWS SDK Java

希望对你有帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-10
    • 2012-07-07
    • 2012-04-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多