目录

Modifies a file and prepares for resumable upload.

Request

HTTP Request

PATCH
https://drive.cloud.hicloud.com/upload/drive/v1/files/{fileId}?uploadType=resume

Parameters

*Some parameters are mandatory.

Parameter NameType
Description
X-Upload-Content-TypestringheaderContent-Type of the file to be uploaded. It is contained in the request header.
X-Upload-Content-Lengthintegerheader   Content-Length of the file to be uploaded. It is contained in the request header.
fileIdstringpathFile ID. (Mandatory)
uploadTypestringqueryType of an upload request. (Mandatory)
addParentFolderstringqueryA comma-separated list of parent IDs to add. Only the first parent ID in the list is used. Update requests must always use addParentFolder and removeParentFolder to modify the parent list.
removeParentFolder
stringquery       A comma-separated list of parent IDs to add. Only the first parent ID in the list is used. Update requests must always use addParentFolder and removeParentFolder to modify the parent list.
quotaIdstringquery   User identifier, consisting of 40 characters at maximum. It is used to restrict the number of API calls of an individual user.
x-hw-trace-idstringheader   ID used for service tracing.
x-hw-app-idstringheader App ID. 
versionstringheader    SDK version number.
x-hw-terminalstringheader    Device model. 
x-hw-osstringheader  Device operating system.
unionIDstringheader   Open user ID. 
User-Agentstringheader App version number or ID. 

Request Body

In the request body, provide data with the following structure:

Parameter NameTypeDescription
appSettings[]stringCustom properties of the requesting app.            
contentExtras.thumbnail.contentstringThumbnail data encoded with Base64.            
contentExtras.thumbnail.mimeTypestringMIME type of the thumbnail.
writerHasCopyPermission            booleanIndicates whether the current user (assuming the writer role) has permission to copy this file.
descriptionstringShort description of the file.
mimeTypestringMIME type of the file.
editedTime            stringLast time the file was modified.
fileName            stringName of the file.
originalFilenamestringThe original name of the file.
properties[]stringCustom file properties that are universally visible.            
favorite            booleanIndicates whether the file has been favorited.            
writersHasSharePermission            booleanIndicates whether the current user (assuming the writer role) has permission to share this file.            
sha256            string            SHA-256 value for the file.            

Response

If successful, this method returns a response header with the following structure:

Parameter NameTypeDescription
LocationstringURI for the resumable upload session.