PutObject
Interface description
Upload the file (object) to the specified bucket.
Request Syntax
Request Header
Key | Type | Description | Sample value |
---|---|---|---|
BucketName | character string | The specified bucket name | samplebucket |
cipher | character string | The key used to encrypt the file | sampleencryptkey |
Don't forget to add your identity signature to the header.
Requestor
Key | Content-Type | Description | Sample value |
---|---|---|---|
file | multipart/form-data | Specify the documents to be submitted | test.log |
Response
Response format: application/json
Status code | Message | Response description |
---|---|---|
200 | fid | Operation successful, return the file fid |
400 | InvalidHead.MissingToken | The access key is empty, or the permissions are insufficient |
400 | InvalidHead.MissingBucketName | The bucket name is missing or not entered |
400 | InvalidHead.BucketName | Wrong bucket name |
400 | InvalidHead.Token | Access key error |
400 | Invalid.DuplicateFileName | Duplicate file |
400 | Unauthorized | Space is not authorized |
400 | InvalidParameter.EmptyFile | An empty file uploaded |
400 | InvalidParameter.FormFile | A form file uploaded |
400 | InvalidParameter.File | Receive file error |
403 | NoPermission | Access key verification failed |
500 | InternalError | Server internal error |
Request example
Request to upload the file of test.log
Last updated