Cloud Storage Start Upload
🔑 Need JWT Authorization
Description
Start upload file to cloud storage
Method And Path
js
POST /v2/cloud-storage/upload/start
Request
Header
ts
{
"authorization": string;
"x-request-id": string;
"x-session-id": string;
}
Body
ts
{
"fileName": string;
"fileSize": number;
"targetDirectoryPath": string;
}
fileName
File name
- maxLength:
128
- minLength:
3
- format: file-suffix
fileSize
File Size
- minimum:
1
- maximum: single_file_size
targetDirectoryPath
Target directory path
- format: directory-path
Response
Success
HTTP Status Code: 200
ts
{
status: Status.Success,
data: {
fileUUID: string,
ossDomain: string,
ossFilePath: string,
policy: string,
signature: string,
}
}
Extends Type: Status
fileUUID
UUID of the current document
ossDomain
OSS domain
ossFilePath
OSS file path
e.g. /test/x.png
policy
OSS policy
Ref: Policy
signature
OSS signature
Ref: Policy
Failed
HTTP Status Code: 200
ts
{
status: Status.Failed,
code: ErrorCode
}