simple php backend for http filebrowser [OUTDATED]
PHP
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
api.php
config.php.sample
utils.php

README.md

PHP filesystem API

Can be used with Ext.ux.filebrowser

WARNING : You should place theses files inside a secure folder (eg: .htacces). Also set $BASE_PATH outside your Apache DOC_ROOT.

Configure $BASE_PATH in config.php which acts as a jail and root for all the commands.

commands :

  • GET

    • cmd=view&file=path/to/file.jpg : display/download arbitraty file
  • POST

    • cmd=get&path=a/nother/path : directory listing
    • cmd=newdir&dir=a/nother/path : creates a directory
    • cmd=rename&oldname=path/to/old.txt&newname=path/to/new.jpg : renames a file or directory
    • cmd=delete&file=a/nother/file.jpeg : deletes a file or directory
  • UPLOAD

    • cmd=upload with multipart/form-encoded FILES (classic form upload, swfupload...)
    • cmd=upload with X_FILE_NAME header with raw contents in the request body (html5 drag'n'drop)