Upload file

After getting the upload link (Get upload link), POST to this link for uploading files. This request is handled by the SecureCloud file server, not by the web API.
The request body must be in multipart/form-data format.
Upon successful upload, this API returns information about uploaded files in the response body.

  • If ret-json=1 is set, the returned information is encoded in JSON. For each uploaded file, a JSON object containing "name", "id", "size" fields will be returned.
  • Otherwise the returned information is a tab separated list of file IDs.

If the upload link was requested with replace=1, it already contains ?replace=1; append ret-json=1 with &.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$
Query Params
string

1 = return a JSON array with file info. If not set, the file IDs are returned as tab-separated string. New apps should set ret-json to 1.

Body Params
file

this field contains the contents to be uploaded.

string

path in your SecureCloud repo that you want to upload local file to. This path must be the same as the 'p' parameter you specified when getting the upload link.

string

sub-folder of "parent_dir", if this sub-folder does not exist, SecureCloud will create it recursively. When you upload a folder, you should set this parameter to the uploaded folder's name.

string

whether to overwrite file when it already exists. 1 for replace, 0 for not replace. If existing file is not replaced, the uploaded file will be renamed to the form "filename (1).txt".

string

the last modified time of the file when uploaded.

Response

Language
Credentials
Bearer
Account-Token
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json