From fab4ecb7dac1781be58179f13ed52607b8c55aa2 Mon Sep 17 00:00:00 2001 From: mappu Date: Sun, 8 Oct 2017 15:32:38 +1300 Subject: [PATCH] doc: update readme --- _dist/README.txt | 48 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/_dist/README.txt b/_dist/README.txt index e2c5a84..084f8bf 100644 --- a/_dist/README.txt +++ b/_dist/README.txt @@ -1,20 +1,52 @@ -A file and image uploading host. +A file / image / paste upload server with a focus on embedding. Written in Go +You can use contented as a standalone upload server, or you can use the SDK to embed its upload widget into another website. + =FEATURES= -- Drag and drop upload of multiple files -- Fallback classic uploader for other browsers +- Drag and drop uploader, or fallback classic uploader +- Multiple files upload +- Pastebin upload +- SDK-oriented design for embedding - Mobile friendly interface -- Preserves upload metadata +- Preserves uploaded filename and content-type metadata +- Hash verification (SHA512/256) +- Options to limit the upload filesize and the upload bandwidth + +=USAGE (SERVER)= + +`Usage of contented: + -data string + Directory for stored content (default "") + -db string + Path for metadata database (default "contented.db") + -listen string + (default "127.0.0.1:80") + -max int + Maximum size of uploaded files in MiB (set zero for unlimited) (default 8) + -speed int + Maximum upload speed in bytes/sec (set zero for unlimited) + -title string + Title used in web interface (default "contented") +` + +=USAGE (EMBEDDING FOR WEB)= + +Your webpage should load the SDK from the contented server, then call the `contented.init` function to display the upload widget over the top of an existing DOM element. + +The SDK will run your callback, passing it the file IDs of any uploaded items. + +The SDK depends on jQuery. + +` + +contented.init("#target", function(/* String[] */ items) {}); +` =TODO= -- Upload should redirect to a landing page -- Sample code to integrate with external systems (webui / ...) -- Switch to SDK-oriented design -- Pastebin service - View upload history / view all uploads - Encrypted at rest (anti- provider snooping) - Shorter URLs