2017-10-08 02:32:38 +00:00
A file / image / paste upload server with a focus on embedding.
2017-10-06 07:22:55 +00:00
Written in Go
2017-10-08 02:32:38 +00:00
You can use contented as a standalone upload server, or you can use the SDK to embed its upload widget into another website.
2018-06-09 06:12:50 +00:00
[go-get]code.ivysaur.me/contented git https://git.ivysaur.me/code.ivysaur.me/contented.git[/go-get]
2017-10-06 07:22:55 +00:00
=FEATURES=
2017-10-15 05:59:00 +00:00
- Drag and drop upload
2017-10-08 02:32:38 +00:00
- Multiple files upload
- Pastebin upload
2017-10-15 05:59:00 +00:00
- Custom drawing upload ([url=https://github.com/Leimi/drawingboard.js]via[/url])
2017-10-15 06:50:48 +00:00
- Ctrl-V upload
2017-10-08 03:42:30 +00:00
- SDK-oriented design for embedding, including CORS support
2017-10-08 02:35:13 +00:00
- Mobile friendly HTML interface
2017-10-08 02:32:38 +00:00
- Preserves uploaded filename and content-type metadata
- Hash verification (SHA512/256)
2017-10-08 02:35:13 +00:00
- Detect duplicate upload content and reuse storage
2017-10-08 02:32:38 +00:00
- Options to limit the upload filesize and the upload bandwidth
2017-10-08 02:53:00 +00:00
- Short URLs (using [url=http://hashids.org]Hashids[/url] algorithm)
2017-11-18 00:34:49 +00:00
- Image thumbnailing
2017-10-08 02:32:38 +00:00
=USAGE (SERVER)=
`Usage of contented:
-data string
Directory for stored content (default "")
-db string
Path for metadata database (default "contented.db")
2017-11-18 01:29:02 +00:00
-diskFilesWorldReadable
Save files as 0644 instead of 0600
2017-10-15 06:16:26 +00:00
-enableHomepage
Enable homepage (disable for embedded use only) (default true)
2017-10-08 02:32:38 +00:00
-listen string
2017-11-18 01:29:02 +00:00
IP/Port to bind server (default "127.0.0.1:80")
2017-10-08 02:32:38 +00:00
-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")
2017-10-15 06:12:25 +00:00
-trustXForwardedFor
Trust X-Forwarded-For reverse proxy headers
2017-10-08 02:32:38 +00:00
`
2017-10-08 06:06:42 +00:00
If you are hosting behind a reverse proxy, remember to set its post body size parameter appropriately (e.g. `client_max_body_size` for nginx).
2017-10-08 03:18:52 +00:00
=USAGE (HTTP)=
The server responds on the following URLs:
- `/get/{ID}` : Download item content
- `/info/{ID}` : Get item content metadata (JSON)
2017-11-18 00:34:49 +00:00
- `/thumb/{Type}/{ID}` : Get item thumbnail image
2017-10-08 03:18:52 +00:00
- `/about` : Get server metadata (JSON)
2017-10-08 02:32:38 +00:00
=USAGE (EMBEDDING FOR WEB)=
2017-10-15 06:47:35 +00:00
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. Your callback will be passed an array of file IDs of any uploaded items.
2017-10-08 02:32:38 +00:00
2017-10-08 04:12:26 +00:00
`< script type = "text/javascript" src = "SERVER_ADDR/sdk.js" > < / script >
2017-10-08 02:32:38 +00:00
contented.init("#target", function(/* String[] */ items) {});
`
2017-10-08 03:42:30 +00:00
=CHANGELOG=
2018-06-09 06:10:54 +00:00
2018-06-09: 1.2.1
- Feature: Add OpenGraph tags on preview pages, for rich metadata in chat applications
- Update thumbnailing library to improve quality
- Use dep for vendoring
2017-11-18 01:29:02 +00:00
2017-11-18: 1.2.0
2017-11-18 00:34:49 +00:00
- Feature: Thumbnail support
2017-11-18 01:29:02 +00:00
- Feature: File preview page
- Feature: Album mode (via URL `/p/{file1}-{file2}-...` )
- Feature: New `-diskFilesWorldReadable` option to save files with `0644` mode
2017-11-18 00:34:49 +00:00
2017-10-15 06:51:36 +00:00
2017-10-15: 1.1.0
2017-10-15 05:59:00 +00:00
- Feature: Drawing mode
2017-10-15 06:50:48 +00:00
- Feature: Ctrl+V image upload
2017-10-15 06:16:26 +00:00
- Feature: Option to trust X-Forwarded-For headers when using a reverse proxy
2017-10-15 05:59:00 +00:00
- Feature: Add `getDownloadURL` , `getInfoJSONURL` , `getPreviewURL` SDK methods
2017-10-15 06:16:26 +00:00
- Feature: Option to disable uploading via the homepage
- Feature: Add button to repeat when uploading from homepage
2017-10-15 05:59:00 +00:00
- Enhancement: Automatically load library dependencies
- Enhancement: Display homepage widget using the full screen size
- Include drawingboard.js 0.4.6 (MIT license)
- Fix a cosmetic issue with javascript console output
- Fix a cosmetic issue with error messages if an upload failed
2017-10-08 04:12:56 +00:00
2017-10-08: 1.0.1
- Fix an issue with CORS preflight requests
- Fix an issue with index URLs
2017-10-08 03:42:30 +00:00
2017-10-08: 1.0.0
- Initial public release
2017-10-15 05:59:00 +00:00
- Include jQuery 1.12.4 (MIT license)