After obtaining the upload URL and credential for a video or image, you can use Base64 decoding to obtain the STS token and URL for OSS upload. Then, call the following operations to upload the video or image file.
For your convenience, we recommend that you use an upload SDK.
Simple upload operations
Note: The maximum size of an object to be uploaded is 5 GB. Resumable upload is not supported.
|PutObject||Uploads an object in simple mode.|
|PostObject||Uploads an object by using the HTML form.|
|AppendObject||Uploads an object in append mode.|
Multipart upload operations
Note: The maximum size of an object to be uploaded is 48.8 TB. Resumable upload is supported.
|InitiateMultipartUpload||Initializes a multipart upload event.|
|UploadPart||Uploads an object in multipart mode.|
|CompleteMultipartUpload||Completes the multipart upload of the entire object.|
|AbortMultipartUpload||Cancels a multipart upload event.|
|ListMultipartUploads||Lists all the ongoing multipart upload events.|
|ListParts||Lists all uploaded parts matching a specific upload ID.|
Upload verification operations
Note: You can obtain the 64-bit CRC value from the metadata of an object to check the data integrity of the object.
|GetObjectMeta||Obtains the metadata of an object.|
|HeadObject||Obtains the metadata of an object. This operation functions the same as the GetObjectMeta operation.|
Before calling an operation, ensure that you have obtained and decoded the upload URL and credential. The mapping between request parameters and decoded upload information is as follows:
ObjectNameparameter maps to the decoded
Hostparameter maps to the decoded
Endpointparameter at the very beginning.
When calculating the value of the
- Use the decoded AccessKey ID and AccessKey Secret pair as the signature key. Do not use the AccessKey of your own account.
- Include the decoded SecurityToken parameter in the request header or in a URL as a request parameter. Use either of these two methods to specify the AccessKey. If both methods are used, OSS returns an InvalidArgument error.
x-oss-security-token:SecurityTokenin the header. When calculating
CanonicalizedOSSHeadersfor a signature, take
security-token=SecurityTokenin a URL. When calculating
CanonicalizedResourcefor a signature, include
If you call OSS operations, you need to go through a complex process to calculate a signature. We recommend that you use an OSS upload SDK.