【问题标题】:While Deleting the object from AWS S3 bucket, Do we need to give the full URL or we just need to give only name of file in S3 bucket从 AWS S3 存储桶中删除对象时,我们需要提供完整的 URL 还是只需要提供 S3 存储桶中的文件名
【发布时间】:2021-10-04 20:01:06
【问题描述】:

我正在使用 Node js 来解决这个问题。我有存储桶的名称和凭据。但是我不知道在从存储桶中删除文件时我们必须添加什么参数。

我有这种 URL 结构:

https://<Region>.amazonaws.com./<Bucket Name>/<File Name>

而我的参数对象是这样的:

const params = { 

  Bucket: BUCKET_NAME,

  Key: fileName !! Doubt what to enter. Full Url or File name        
};

【问题讨论】:

    标签: javascript jquery node.js amazon-s3 delete-file


    【解决方案1】:

    您只需要提供这 2 个参数,Bucket 和 Key。您不必提供完整的网址。查看Documentation

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-09-13
      • 2019-02-19
      • 2018-09-30
      • 2020-07-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多