API: Uploading files

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-Type should be multipart/form-data with the file part looking like this: Content-Disposition: form-data; name=“file”; filename=“ignored.ext”. Note that the filename is taken from the path or filePath parameter, 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