亚马逊三避免具有相同名称的覆盖对象 [英] Amazon S3 avoid overwriting objects with the same name

查看:379
本文介绍了亚马逊三避免具有相同名称的覆盖对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我上传文件到S3的文件名相同,它覆盖它的bucekt对象的文件名。哪些选项的存在是为了避免相同的文件名overwritting文件?我启用了版本在我的水桶以为它会解决这个问题,但对象仍然覆盖。

If I upload a file to S3 with the filename identical to a filename of an object in the bucekt it overwrites it. What options exists to avoid overwritting files with identical filenames? I enabled versioning in my bucket thinking it will solve the problem but objects are still overwritten.

推荐答案

从上面我的意见不起作用。我以为 ACL将适用对象为好,但它只能在桶。

My comment from above doesn't work. I thought the WRITE ACL would apply to objects as well, but it only works on buckets.

由于启用了版本控制,你的对象不会被覆盖。但是,如果你没有在GET请求,或URL指定版本,最新的版本将采取。这意味着,当你把和对象为S3,你需要保存versionID的反应告诉你,以便检索的第一对象。

Since you enabled versioning, your objects aren't overwritten. But if you don't specify the version in your GET request or URL, the latest version will be taken. This means when you put and object into S3 you need to save the versionID the response tells you in order to retrieve the very first object.

请参阅<一href="http://stackoverflow.com/questions/10592541/amazon-s3-acl-for-read-only-and-write-once-access">Amazon S3 ACL为只读,只写一次访问了解。

这篇关于亚马逊三避免具有相同名称的覆盖对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆