forked from electricdusk/rushlink
41f4de43ac
Fixes #25
26 lines
818 B
Cheetah
26 lines
818 B
Cheetah
{{define "body"}}
|
|
<pre>
|
|
#RU URL SHORTENER
|
|
=================
|
|
|
|
Based on https://0x0.st/, this site allows you to easily shorten URLs using
|
|
the command line.
|
|
|
|
## USAGE
|
|
|
|
# Upload a file
|
|
curl -F'file=@yourfile.png' <a href="//{{.Request.Host}}">https://{{.Request.Host}}</a>
|
|
|
|
# Shorten a URL
|
|
curl -F'shorten=http://example.com/some/long/url' <a href="//{{.Request.Host}}">https://{{.Request.Host}}</a>
|
|
|
|
# The first line of the result will contain the shortened URL.
|
|
#
|
|
# In the other lines, you will find other information, including
|
|
# information on how to delete the shortened object.
|
|
|
|
# To upload a file and only extract the shortened URL (i.e. throw away the rest)
|
|
curl -F'file=@yourfile.png' <a href="//{{.Request.Host}}">https://{{.Request.Host}}</a> | head -n 1
|
|
</pre>
|
|
{{end}}
|