Added URL shortener

This commit is contained in:
2022-11-02 18:49:43 +01:00
parent 1d32fb0365
commit e874e4e473
3 changed files with 104 additions and 46 deletions

View File

@@ -17,12 +17,19 @@
Get /: Show this page
Get /{id}: Get paste by ID and return in plain text
Post /: Create new paste (plain text raw body or form parameter 'content') and return random generated key
Post /{id}: Create new paste (plain text raw body) and return requested key if available, else random generated key
Post /{id}: Create new paste (plain text raw body) and return requested key if available, else random generated key
Get /to/{id}: Navigate to shortcut link (browser redirect)
Post /to: Create new link (plain text raw body or form parameter 'link') and return random generated key
Post /to/{id}: Create new link (plain text raw body) and return requested key if available, else random generated key
FROM TERMINAL
Pipe your input into: curl -F 'content=<-' paste.plabble.org -w "\n"
Or post it as raw data like: curl paste.plabble.org -H "Content-Type: text/plain" -d @- -w "\n"
Pipe your input into: curl -F 'content=<-' paste.plabble.org -w '\n'
Or post it as raw data like: curl paste.plabble.org -H 'Content-Type: text/plain' -d @- -w '\n'
You can create an alias for this! To get the result: curl paste.plabble.org/YOURID
For links:
Pipe your input into: curl -F 'link=<-' paste.plabble.org/to -w '\n'
</pre>
</body>
</html>