| Target URL | /api.php/files/upload/ |
| Required scope | upload |
| HTTP Method | PUT/POST |
| Output format | JSON |
Request Parameters Reference
| Parameter | Type | Description |
|---|---|---|
| path | string | The FileRun path of the target file. |
| filePath | string | To be used instead of path when you wish a folder structure to be automatically created. |
For HTTP POST upload, the request's
Content-Typeshould bemultipart/form-datawith the file part looking like this:Content-Disposition: form-data; name=“file”; filename=“ignored.ext”. Note that the filename is taken from thepathorfilePathparameter, not the multipart data.
Example
curl -X PUT --header "Authorization: Bearer neY6uAjKO1KqQh98RZZ5DOgYjIPMuu9duvvHGUiN" -T your-file.ext https://demo.filerun.com/api.php/files/upload/?path=/ROOT/HOME/existing-folder/my-file.ext
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/my-file.ext - is the remote path where
you wish the file to be uploaded. The folder needs to exist and will
not be automatically created.