| Target URL | /api.php/Drive/files/upload |
| Required scope | upload |
| HTTP Method | PUT |
| Output format | JSON |
Request Parameters Reference
| Parameter | Type | Description |
|---|---|---|
| path | string | The FileRun path of the target folder. |
| filePath | string | Subpath and file name. |
Example
curl -X PUT --header "Authorization: Bearer neY6uAjKO1KqQh98RZZ5DOgYjIPMuu9duvvHGUiN" -T your-file.ext https://demo.filerun.com/api.php/Drive/files/upload/?path=/ROOT/HOME/existing-folder&filePath=New-Folder/my-file.ext&totalSize=123&startByte=0
neY6uAjKO1KqQh98RZZ5DOgYjIPMuu9duvvHGUiN - is the previously
received "access_token"your-file.ext - is the path of the file you want to upload from the
local computerhttps://demo.filerun.com - is the URL of your FileRun installation/ROOT/HOME/existing-folder - is the remote path where you wish the file to be uploaded. The folder needs to exist and will not be automatically created.New-Folder/my-file.ext - New-Folder is the folder path where you wish the file to be uploaded. This will be automatically created. my-file.ext is the name of your file.totalSize - is the size of the file you wish to upload.startByte - is an integer value specifying the number of bytes where the transfer is being resumed.Optional parameters:
getOffset - specify this to get information about a possibly existing temporary file created by an interrupted transfer. If the response offset is not 0, it is recommended that you upload the file from that number of bytes forward.lastModified - integer specifying the Unix timestamp of the file's last modification date. This will be applied to the file after upload. It is also used to automatically reject transfers for files with the same name, same size and same modified date.