how to upload same name file to amazon s3 and overwrite exist file

前端 未结 2 2052
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-05 11:01
    s3.putObject({
        Bucket: bucketName,
        Key: fileName,
        Body: file,
        ACL: \'bucket-owner-full-control\'
    }, function(err, data) {
      i         


        
2条回答
  •  臣服心动
    2021-02-05 11:52

    By default, when you upload the file with same name. It will overwrite the existing file. In case you want to have the previous file available, you need to enable versioning in the bucket.

提交回复
热议问题