Uploading an Object Using the POST Method

You can also upload an object using the POST method. If the bucket versioning state is set to Enabled, the system automatically generates a unique version ID for the object. If the bucket versioning state is set to Suspended, the version ID of the object is null, which is returned in the response header x-obs-version-id.

The format of a POST upload request is as follows:

POST / HTTP/1.1 
Host: bucketname.obsdomainName 
User-Agent: browser_data 
Accept: file_types 
Accept-Language: Regions 
Accept-Encoding: encoding 
Accept-Charset: character_set 
Keep-Alive: 300 
Connection: keep-alive 
Content-Type: multipart/form-data; boundary=-9431149156168 
Content-Length: length 
--9431149156168 
Content-Disposition: form-data; name="key" 
acl 
--9431149156168 
Content-Disposition: form-data; name="success_action_redirect" 
success_redirect 
--9431149156168 
Content-Disposition: form-data; name="content-Type" 
content_type 
--9431149156168 
Content-Disposition: form-data; name="x-obs-meta-uuid" 
uuid 
--9431149156168 
Content-Disposition: form-data; name="x-obs-meta-tag" 
metadata 
--9431149156168 
Content-Disposition: form-data; name="AccessKeyID" 
access-key-id 
--9431149156168 
Content-Disposition: form-data; name="policy" 
encoded_policy 
--9431149156168 
Content-Disposition: form-data; name="signature" 
signature= 
--9431149156168 
Content-Disposition: form-data; name="file"; filename="MyFilename" 
Content-Type: image/jpeg 
file_content 
--9431149156168 
Content-Disposition: form-data; name="submit" 
Upload to OBS 
--9431149156168--