Atomic updates in Aliyun OSS
(Sorry, I don't speak Chinese, I posted on Stackoverflow first, but no one seems to know Aliyun OSS there, please anyone translate this question, and kindly also cross-post answers to Stackoverflow)
Is there a way to do atomic updates in Aliyun OSS?
-
replace an object only if it exists and the current version matches a given ETag
-
upload an object only if it does not exist
Since OSS appears to be heavily inspired by Amazon S3, answers for S3 are possibly applicable and also appreciated.
If that makes a difference, I am using the Java API.
Answers
Currently,you may use the "head" method to try to check if a given object exists(it will return the object's etag and other http header imformations if exists).and after then,you can break or "put" you object. i think oss will support atomic put in the future days. Won't you?Aliyun