Skip to content
19 LOC pastebin in Crystal
Branch: master
Clone or download
Latest commit 3fb6218 Mar 14, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
files upload files to ./files Mar 14, 2019
.gitignore ignore uploaded files Mar 20, 2019
LICENSE
pastebin.cr Add put path in path variable Mar 14, 2019
readme.md

readme.md

19 LOC pastebin in Crystal

To try it out send a POST request with a form containing a file, the response body is the pastebin ID.

Sample curl:

$ curl -i -X POST -F file=@x.txt localhost:3000
HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 8

slaa7MN5

To read it, send a GET request to localhost:3000/slaa7MN5

You can’t perform that action at this time.