That's a ULTRA simple pastebin engine written in Rust!
API is VERY simple and does not require any api keys, authorization, etc
Uploadable pastes stores directly in memory.
Default limits (configurable in settings.cfg)
Add paste with text/html content-type
```
POST /add
BODY:
Response variants: pasteid, or any error type ```
Add paste with text/plain content-type
```
POST /addplain
BODY:
Response variants: pasteid, or any error type ```
You can also upload pastes through web interface
``` GET /[pasteid]
Response: Paste content with text/html content type or 404 Error if paste not found ```
``` GET /total
Response: Returns total paste count in trashbin instance ```
Any error return 4XX HTTP Code and reason in body with text/plain
content-type:
The request payload is too large
(413) - Occurs if request has execeed upload limit (5 MB by default)
Empty request
(400) - Occurs if request body is empty
You can install latest version via cargo:
cargo install trashbin
Or install latest CI build (https://gitlab.com/cc-ru/trashbin/-/pipelines)
Download and install rust, clone this repository and run
cargo build --release
Go to target/relese
folder and run:
./trashbin (ipadress:port)
I want to create ULTRA simple pastebin for IRC-bots multiline output - in this use case long-term storage is not needed...