Roxy Fileman custom server side scriptsRoxy Fileman server side scripts could be written in any server programming language. Here is detailed description of all parameters sent and responses expected by the Roxy Fileman user interface. List directory treeThis script should send the entire directory tree, beginning with the root directory (set via "FILES_ROOT" setting). The response is an array of objects, e.g.
[
{"p":"root_dir", "f":"3", "d":"2"},
{"p":"root_dir/dir1", "f":"2", "d":"0"},
{"p":"root_dir/dir2", "f":"5", "d":"1"},
{"p":"root_dir/dir2/subdir1", "f":"9", "d":"0"}
]
In order to minimize the data transferred the object properties are only one letter long. List files in a directoryParameters: This script should send list of the files in the directory filtered by type. The response is an array of objects, e.g.
[
{"p":"/path/file1.jpg", "s":"5884", "t":"1390779016", "w":"800", "h":"600"},
{"p":"/path/file2.doc", "s":"187374", "t":"1390779016", "w":"0", "h":"0"},
{"p":"/path/file3.txt", "s":"5848", "t":"1390779016", "w":"0", "h":"0"},
{"p":"/path/file4.png", "s":"487885", "t":"1390779016", "w":"500", "h":"300"}
]
In order to minimize the data transferred the object properties are only one letter long. Copying directoryParameters *: Response: standard ** Copying fileParameters *: Response: standard ** Create directoryParameters *: Response: standard ** Delete directoryParameters *: Response: standard ** Download fileParameters *: Response: Set headers to force download and output the file. Move directoryParameters *: Response: standard ** Move fileParameters *: Response: standard ** Rename directoryParameters *: Response: standard ** Move fileParameters *: Response: standard ** Generate thumbnailParameters *: Note: you will probably need to crop images. Response: standard ** Upload filesParameters: Response: standard ** * Parameters are sent via POST request. ** Standard response is in JSON format and contains either
{"res":"ok", "msg":""}
in case of success or
{"res":"error", "msg":"This is the error displayed to the user"}
in case of error. |
Download |