tencent cloud

Smart Media Hosting

Product Introduction
Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
Purchase Guide
Quick Start
Create Media Library
Initiate request
Service Level API Document
History
Introduction
API Category
Making API Requests
PaaS Service APIs
Official Cloud Disk APIs
Data Types
Error Codes
Business Level API Document
Introduction
Access Token Operation API
Tenant Space Operation API
File Operation API
Directory or Album Operation API
Recycle Bin Operation API
Quota Operation API
Query Task Operation API
Search Operation API
Historical Version Operations API
Directory and File Batch Operation API
Collection Operation API
Error Codes
SDK Documentation
Android SDK
iOS SDK
HarmonyOS SDK
FAQs
Enterprise Network Disk
Product Introduction
Purchase Guide
Quick Start
FAQs
Service Level Agreement
Glossary

Get File Upload Task Status

PDF
聚焦模式
字号
最后更新时间: 2026-01-07 14:15:06

Description

To obtain the status of a file upload task.
Note:
Required permissions: admin, space_admin, upload_file, upload_file_force, begin_upload, or begin_upload_force. For details on permissions, refer to Generate Access Token Interface. (Note: Although this interface is a read interface, since it reads upload task information, it still requires permissions related to uploading files.)

Request

Request Example

GET /api/v1/file/{LibraryId}/{SpaceId}/{ConfirmKey}?upload&access_token={AccessToken}&user_id={UserId}

Request Parameter

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

Request Body

This request does not have a request body.

Response

Response code

Successful retrieval, returns HTTP 200 OK.

Response Body

application/json
Response body example:
{
"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 body field description:
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

Error Codes

This request operation has no special error messages. For common error messages, see Error Codes.

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈