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 uploader, or fallback classic uploader
- Multiple files upload
- Pastebin upload
- SDK-oriented design for embedding
- Mobile friendly interface
- 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=
- View upload history / view all uploads
- Encrypted at rest (anti- provider snooping)
- Shorter URLs
- Deploy!
- Display 'my uploads' (id + metadata history kept in localstorage)