Creates a new directory or uploads a file to an existing directory.
The form parameters must be sent in the order displayed below for the realtime error checking to work. If 'name' comes after 'file' it will be ignored.
Param | Location | Description |
type | Form Values | The type of node to create, can either be 'directory', or 'file' |
name | Form Values | Name of the directory to create, or of file to create. Not required if 'type' is 'file' |
file | Form Values | Multipart file to upload to the directory. Will be ignored if 'type' is 'directory' |
HTTP 200: OK { "success": true, "id": "abc123" // ID of the newly uploaded file }todo
Returns information about the requested path.
Param | Required | Location | Description |
path | true | URL | Path to the directory or file to request |
download | false | URL | If the URL paramater '?download' is passed the requested file will be downloaded (if it is a file) |
HTTP 200: OK { "success": true, "name": "some dir", "path": "/some dir", "type": "directory", "child_directories": [ { "name": "some other directory", "type": "directory", "path": "/some dir/some other directory" } ], "child_files": [ { "name": "11. Lenny Kravitz - Fly away.ogg", "type": "file", "path": "/some dir/11. Lenny Kravitz - Fly away.ogg" } ] }
HTTP 200: OK { "success": true, "name": "11. Lenny Kravitz - Fly away.ogg", "path": "/some dir/11. Lenny Kravitz - Fly away.ogg", "type": "file", "file_info": { "success": true, "id": "Jf_u5TI9", "name": "11. Lenny Kravitz - Fly away.ogg", "date_upload": "2018-07-04T22:24:48Z", "date_last_view": "2018-07-04T22:24:48Z", "size": 9757269, "views": 0, "mime_type": "application/ogg", "thumbnail_href": "/file/Jf_u5TI9/thumbnail" } }
Deletes a filesystem node.
Param | Required | Location | Description |
path | true | URL | Path of the entity to delete |
HTTP 200: OK { "success": true }