Closed namoshizun closed 4 years ago
You can try these two apis:
You can try these two apis:
- client.listObjects
- client.headObject
Yeah that's certainly a possible solution for this, but what I actually hoped is that the response of object delete will be different if the target does not exist, so that I don't need to send another query before or after just to confirm the target existence. Would be better if deleteObject
raise an exception in such case, or accept an keyword param like "ensure_exist" which will raise the exception if is set to True.
You can try these two apis:
- client.listObjects
- client.headObject
Yeah that's certainly a possible solution for this, but what I actually hoped is that the response of object delete will be different if the target does not exist, so that I don't need to send another query before or after just to confirm the target existence. Would be better if
deleteObject
raise an exception in such case, or accept an keyword param like "ensure_exist" which will raise the exception if is set to True.
This feature is not supported currently. We'll evaluate it as soon as possible.
Hii, It appears that while deleting an object, the response payload will always include status code "204" regardless of the object actually exist or not, in which case, there is no easy way for me to raise a warning in my application in the titled scenario... Is there a way to know if the object to be deleted already exist on the storage?