This operation can truncate an object to a specified size.
This API is supported only by parallel file systems. For details about how to create a parallel file system, see Sample Request: Creating a Parallel File System.
PUT /ObjectName?truncate&length=Length HTTP/1.1 Host: bucketname.obs.region.example.com Authorization: authorization Content-Length: length Date: date
The request needs to specify parameters in the message, indicating that this is to truncate an object to a specified size. Table 1 describes the parameters.
This request uses common request headers. For details, see Table 3.
This request involves no elements.
1 2 3 4 5 | HTTP/1.1 204 status_code Server: OBS x-obs-request-id: request-id x-obs-id-2: id Date: Date |
The response to the request uses common headers. For details, see Table 1.
This response contains no elements.
No special error responses are returned. For details about error responses, see Table 2.
PUT /ObjectName?truncate&length=1000 HTTP/1.1 Host: examplebucket.obs.region.example.com Authorization: OBS H4IPJX0TQTHTHEBQQCEC:75/Y4Ng1izvzc1nTGxpMXTE6ynw= Content-Length: 1 Date: WED, 01 Jul 2015 04:19:20 GMT
1 2 3 4 5 | HTTP/1.1 204 No Content Server: OBS x-obs-request-id: 8DF400000163D3F51DEA05AC9CA066F1 x-obs-id-2: 32AAAUgAIAABAAAQAAEAABAAAQAAEAABCSgkM4Dij80gAeFY8pAZIwx72QhDeBZ5 Date: WED, 01 Jul 2015 04:19:21 GMT |