我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

S3 - 使用相同名称上传?

I'm uploading images to S3 using their API and putObject.

When I upload an image which has the same key as an object already in the bucket, the original object is overwritten.

Is there away around this?

I've checked SO but it's quite an old question now, are there any newer/better methods?

S3 is designed to allow you to do overwrites in this way. However, if you are using the AWS SDK for PHP, you could use the doesObjectExist method prior to using putObject, if you wanted to check for the existence of an object before you upload it.

近期文章

  • PHP 5.4错误日志中的空白错误
  • Magento href返回同一页面
  • 排序PHP数组和设置键
  • Laravel:未定义的变量内容
  • Where子句在两个表上使用db前缀
  • 通过单击链接显示mySQL条目
  • 关于数据库查询的IF语句不会执行
  • 单击“提交”按钮后继续加载
  • 选择表格单元格并保存到会话
  • 将变量添加到数组内的路径中
  • MySQL Max和Correspondence记录值
  • 我收到以下php错误[重复]
  • Cakephp 3.x并接受第三方xml数据
  • 错误语法mysql..when将数组保存到数据库
  • 如何从字符串中删除结束空白段落?
  • 将Web表单连接到具有安全性的Web服务
  • 如何跨两个不同的CI CodeBase共享CodeIgniter会话?
  • 如何根据上一个下拉框的值更新下拉框
  • 当使用createUrl()时,Yii 2在排序名称的开头添加连字符
  • 在非对象上调用成员函数bind_param() - 在准备之前返回[重复]

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华