Problem description
The object name does not comply with OSS naming conventions.
Causes
The object name in the request starts with a forward slash (/) or a backslash (\). A leading slash creates a double-slash path in the HTTP request URL — for example, //test.txt — which OSS rejects.
A forward slash is valid within an object name (for example,logs/2025/app.log). The restriction applies only to names that start with/or\.
Examples
The following PutObject request uses an object name that starts with a forward slash (/), producing the path //test.txt:
PUT //test.txt HTTP/1.1
Content-Length: ContentLength
Content-Type: ContentType
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: SignatureValueSolutions
Rename the object so its name complies with all OSS naming conventions:
| Rule | Requirement |
|---|---|
| No leading slash or backslash | The name cannot start with / or \ |
| UTF-8 encoding | The name must be UTF-8 encoded |
| Length | 1–1,023 characters |
| Case-sensitive | Report.txt and report.txt are different objects |
The following request uses a valid object name:
PUT /test.txt HTTP/1.1
Content-Length: 344606
Content-Type: image/jpeg
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Sat, 21 Nov 2015 18:52:34 GMT
Authorization: OSS qn6q**************:77Dv****************