Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
GET /api/v1/file/{LibraryId}/{SpaceId}/{ConfirmKey}?upload&access_token={AccessToken}&user_id={UserId}
Request parameters. | Description | Type | Required or Not |
LibraryId | Media Library ID, obtained after creating a media library through the media hosting console. See create media library | String | Yes |
SpaceId | Space ID. If the media library is in single-tenant mode, this parameter is fixed as hyphen (`-`); if the media library is in multi-tenant mode, you must specify this parameter. See create tenant space | String | No |
ConfirmKey | Confirm parameters, specify as the confirmKey field value in the response body during file upload. | String | Yes |
AccessToken | Access token, see Generate access token | String | Yes |
UserId | User identity recognition. When the access token corresponds to admin permission and the user identity recognition when applying for the access token is empty, it is used to temporarily specify user identity. For details, see Generate Access Token API | String | No |
{"confirmed": false,"path": [ "foo", "bar", "DCIM001.mp4" ],"type": "video","creationTime": "2021-02-01T08:15:58.000Z","conflictResolutionStrategy": "ask","force": false,"availableDomainNum": 1,"uploadId": "1754379542fofb157a8cf6765ba250fed28be8471cbcff1fabf32ebcee87ce1b6cf1b2a6e1","parts": [{"PartNumber": 1,"LastModified": "2021-02-01T08:16:02.000Z","ETag": "\\"39270a968a357d24207e9911162507eb\\"","Size": 1048576},{"PartNumber": 2,"LastModified": "2021-02-01T08:16:05.000Z","ETag": "\\"d899fbd1e06109ea2e4550f5751c88d6\\"","Size": 1048576}],"uploadPartInfo": {"domain": "examplebucket-1250000000.cos.ap-beijing.myqcloud.com","path": "smhxxx/xxx.mp4"","uploadId": "1754379542fofb157a8cf6765ba250fed28be8471cbcff1fabf32ebcee87ce1b6cf1b2a6e1","headers": {"Content-Type": "application/octet-stream","Authorization": "q-sign-algorithm=sha1&xxx","x-cos-security-token": "bKdMa7A0nAJjqejygamFMyWoXCC0uRLxxxxxx"},"expiration": "2021-07-24T10:34:32.000Z"}}
Response Parameters | Description | Type |
confirmed | Represents whether the current upload task is completed, including true and false. | Boolean |
path | string array or null. If it is a string array, it indicates the final file path. The last element in the array represents the final file name, while the other elements represent each first-level directory name. Because files with the same name may be renamed automatically, the final path here may not equal the path specified when uploading started. If it is null, it means the directory where the file resides or a certain parent directory has been deleted, and the file can no longer be accessed. | String |
type | File type, including file and video. | String |
creationTime | Upload task creation time | String |
conflictResolutionStrategy | handling method when filename conflict, defaults to rename ask: returns HTTP 409 Conflict and error code SameNameDirectoryOrFileExists when conflicts with rename: automatically rename the file when conflicts with overwrite: If the target is a directory or album, it defaults to ask and does not support overwrite. If the target is a file, overwrite the existing file When a file exists in the target space with an earlier version, moving to overwrite is not supported. | String |
force | Force overwrite path file | Boolean |
availableDomainNum | Number of available domains | Int |
uploadId | If the request is for multi-part upload, return this field as the request parameter to be specified for the actual file upload; otherwise, this field is not returned. | String |
parts | If the request is for multi-part upload, return this field containing the uploaded chunk information; otherwise, this field is not returned. | Array |
uploadPartInfo | If the request is for multi-part upload, return this field containing information for continuing the multipart upload (please see the **Start Multipart Upload** API); otherwise, this field is not returned. | Array |
フィードバック