doc: update readme

This commit is contained in:
mappu 2017-10-08 15:32:38 +13:00
parent d9e4c9b420
commit fab4ecb7da

View File

@ -1,20 +1,52 @@
A file and image uploading host. A file / image / paste upload server with a focus on embedding.
Written in Go 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= =FEATURES=
- Drag and drop upload of multiple files - Drag and drop uploader, or fallback classic uploader
- Fallback classic uploader for other browsers - Multiple files upload
- Pastebin upload
- SDK-oriented design for embedding
- Mobile friendly interface - 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.
`
<script type="text/javascript" src="SERVER_ADDR/sdk.js"></script>
contented.init("#target", function(/* String[] */ items) {});
`
=TODO= =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 - View upload history / view all uploads
- Encrypted at rest (anti- provider snooping) - Encrypted at rest (anti- provider snooping)
- Shorter URLs - Shorter URLs