All Products
Search
Document Center

Object Storage Service:0016-00000005

Last Updated:Apr 29, 2024

Problem description

The object name does not comply with the naming conventions.

Causes

The object name in the request starts with a forward slash (/) or a backslash (\).

Examples

In the following PutObject request, the object name starts with a forward slash (/).

PUT //test.txt HTTP/1.1
Content-Length: ContentLength
Content-Type: ContentType
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue

Solutions

Make sure that the object name in the request complies with the following naming conventions:

  • The name cannot start with a forward slash (/) or a backslash (\).

  • The name must be encoded in UTF-8.

  • The name must be 1 to 1,023 characters in length.

  • The name is case-sensitive.

Correct examples:

PUT /test.txt HTTP/1.1
Content-Length: 344606 
Content-Type: image/jpg
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Sat, 21 Nov 2015 18:52:34 GMT
Authorization: OSS qn6q**************:77Dv****************

References