new route to list files in a share. TODO: use for split upload to check existing splits

This commit is contained in:
Ville Rantanen
2018-03-02 15:37:37 +02:00
parent 9e4b2892d5
commit cd76452779
2 changed files with 57 additions and 0 deletions

View File

@@ -75,3 +75,43 @@ Operation is one of download, direct_download, zip_download, or upload
direct links. You can have many tokens for single share.
- Direct download token is (password hash + filename) hashed
# Routes
- @app.route("/")
Display the list of public shares, or the ones logged in to
- @app.route('/authenticate/<name>', methods=['GET','POST'])
Query the password for the share
- @app.route('/upload/<name>/<token>', methods=['POST'])
Upload a file from command line
- @app.route('/upload', methods=['POST'])
Upload file from the browser
- @app.route('/upload_join/<name>/<token>', methods=['POST'])
Commence joining of a splitted upload file
- @app.route('/files/<name>/<token>', methods=['GET'])
Return plain text list of files in the share
- @app.route('/list/<name>/<token>', methods=['GET'])
Login to a share with a token
- @app.route('/list/<name>', methods=['GET'])
List share contents for the browser
- @app.route('/logout/<name>', methods=['GET'])
Logout from share. Only for browser.
- @app.route('/direct/<name>/<token>/<filename>', methods=['GET'])
Download a file using the filename token (if direct download enabled)
- @app.route('/download/<name>/<token>/<filename>', methods=['GET'])
Download a file using the share token
- @app.route('/download/<name>/<filename>', methods=['GET'])
Download a file with a browser
- @app.route('/zip/<name>/<token>', methods=['GET'])
Download the whole share as a zip file using share token
- @app.route('/zip/<name>', methods=['GET'])
Download the whole share as a zip file using browser
- @app.route('/script/upload/<name>/<token>', methods=['GET'])
Get a bash script that uploads multiple files. Folders are uploaded as .tar.gz
- @app.route('/script/download/<name>/<token>', methods=['GET'])
Get a bash script that downloads all the files in a share.
- @app.route('/script/direct/<name>/<token>', methods=['GET'])
Get a bash script that downloads all the files in a share using direct filename tokens.
- @app.route('/script/upload_split/<name>/<token>', methods=['GET'])
Get a bash script that uploads multiple files and folders. The script splits files
to smaller chunks, to prevent timeouts. Folders are uploaded as .tar