Delete Object

Last Updated: Mar 21, 2017

The Delete Object operation is used to delete an object.

Request syntax

  1. DELETE /ObjectName HTTP/1.1
  2. Host: BucketName.oss-cn-hangzhou.aliyuncs.com
  3. Date: GMT Date
  4. Authorization: SignatureValue

Detail analysis

  • To delete an object with Delete Object, you must have the write permission to this object.
  • If the object to be deleted does not exist, the OSS will return the 204 No Content status code.
  • If the bucket of the object does not exist, the system will return 404 Not Found.
  • If the file type is symbolic link, only the symbolic links will be deleted.

Example

Request example:

  1. DELETE /copy_oss.jpg HTTP/1.1
  2. Host: oss-example.oss-cn-hangzhou.aliyuncs.com
  3. Date: Fri, 24 Feb 2012 07:45:28 GMT
  4. Authorization: OSS qn6qrrqxo2oawuk53otfjbyc:zUglwRPGkbByZxm1+y4eyu+NIUs=

Response example:

  1. HTTP/1.1 204 NoContent
  2. x-oss-request-id: 559CC9BDC755F95A64485981
  3. Date: Fri, 24 Feb 2012 07:45:28 GMT
  4. Content-Length: 0
  5. Connection: keep-alive
  6. Server: AliyunOSS
Thank you! We've received your feedback.