目录

Creates a file and prepares for resumable upload.

Request

HTTP Request

POST
https://drive.cloud.hicloud.com/upload/drive/v1/files?uploadType=resume

Parameters

*Some parameters are mandatory.

Parameter NameType
Description
X-Upload-Content-TypestringheaderContent-Type of the file to be uploaded.
X-Upload-Content-LengthintegerheaderContent-Length of the file to be uploaded. 
uploadTypestringqueryType of an upload request. (Mandatory)
quotaIdstringqueryUser identifier, consisting of 40 characters at maximum. It is used to restrict the number of API calls of an individual user.
x-hw-trace-idstringheaderID used for service tracing. 
x-hw-app-idstringheaderApp ID. 
versionstringheaderSDK version number.
x-hw-terminalstringheaderDevice model. 
x-hw-osstringheaderDevice operating system.
unionIDstringheaderOpen user ID. 
User-AgentstringheaderApp 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.
writerHasCopyPermissionbooleanIndicates whether the current user (assuming the writer role) has permission to copy this file.
createdTimestringTime when the file was created.
descriptionstringShort description of the file.
mimeTypestringMIME type of the file.
editedTimestringLast time the file was modified.
fileNamestringName of the file.
originalFilenamestringThe original name of the file.
parentFolder[]stringParent folder.
properties[]stringCustom file properties that are universally visible.
favoritebooleanIndicates whether the file has been favorited.
writersHasSharePermissionbooleanIndicates whether the current user (assuming the writer role) has permission to share this file.
sha256stringSHA-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.