web: Add an example w/ upload from process output

Fixes #35
This commit is contained in:
Daan Sprenkels 2019-12-19 23:29:09 +01:00
parent 245dd64f82
commit 095348d614
2 changed files with 6 additions and 0 deletions

View File

@ -38,6 +38,9 @@ curl -F'shorten=http://example.com/some/long/url' <a href="{{.RootURL}}">{{.Root
# In the other lines, you will find other information, including
# information on how to delete the shortened object.
# Upload output from another process
figlet Rushlink | curl -F'file=@-' <a href="{{.RootURL}}">{{.RootURL}}</a>
# To upload a file and only extract the shortened URL (i.e. throw away the rest)
curl -F'file=@yourfile.png' <a href="{{.RootURL}}">{{.RootURL}}</a> | head -n 1
</pre>

View File

@ -17,5 +17,8 @@ curl -F'shorten=http://example.com/some/long/url' {{.RootURL}}
# In the other lines, you will find other information, including
# information on how to delete the shortened object.
# Upload output from another process
figlet Rushlink | curl -F'file=@-' {{.RootURL}}
# To upload a file and only extract the shortened URL (i.e. throw away the rest)
curl -F'file=@yourfile.png' {{.RootURL}} | head -n 1