diff --git a/Filer-Server-API.md b/Filer-Server-API.md index b289308..2f8c4b9 100644 --- a/Filer-Server-API.md +++ b/Filer-Server-API.md @@ -3,24 +3,26 @@ You can append to any HTTP API with &pretty=y to see a formatted json output. ### POST/PUT/GET files ```bash # Basic Usage: - //create or overwrite the file, the directories /path/to will be automatically created - POST /path/to/file - PUT /path/to/file - //create or overwrite the file, the filename in the multipart request will be used - POST /path/to/ - //create or append the file - POST /path/to/file?op=append - PUT /path/to/file?op=append - //get the file content - GET /path/to/file - //return a json format subdirectory and files listing - GET /path/to/ - Accept: application/json + //create or overwrite the file, the directories /path/to will be automatically created + POST /path/to/file + PUT /path/to/file + //create or overwrite the file, the filename in the multipart request will be used + POST /path/to/ + //create or append the file + POST /path/to/file?op=append + PUT /path/to/file?op=append + //get the file content + GET /path/to/file + + //return a json format subdirectory and files listing + GET /path/to/ + Accept: application/json + # options for POST a file: - // set file TTL - POST /path/to/file?ttl=1d - // set file mode when creating or overwriting a file - POST /path/to/file?mode=0755 + // set file TTL + POST /path/to/file?ttl=1d + // set file mode when creating or overwriting a file + POST /path/to/file?mode=0755 ``` | POST/PUT Parameter | Description | Default | | ---- | -- | -- | @@ -118,8 +120,8 @@ curl -H "Accept: application/json" "http://localhost:8888/javascript/?pretty=y" ### GET files ```bash - //get file with a different content-disposition - GET /path/to/file?response-content-disposition=attachment%3B%20filename%3Dtesting.txt + //get file with a different content-disposition + GET /path/to/file?response-content-disposition=attachment%3B%20filename%3Dtesting.txt ``` | GET Parameter | Description | Default | | ---- | -- | -- |