parent
ffeb9a3362
commit
8dce4e8483
@ -15,4 +15,8 @@ body {
|
||||
transition: visibility 175ms, opacity 175ms;
|
||||
width: 100%;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding-left: 4ex; /* approx 4 monospaced spaces */
|
||||
}
|
@ -27,18 +27,18 @@ the command line.
|
||||
|
||||
<h2>Command line API</h2>
|
||||
<pre>
|
||||
# Upload a file
|
||||
curl -F'file=@yourfile.png' <a href="{{.RootURL}}">{{.RootURL}}</a>
|
||||
# Upload a file
|
||||
curl -F'file=@yourfile.png' <a href="{{.RootURL}}">{{.RootURL}}</a>
|
||||
|
||||
# Shorten a URL
|
||||
curl -F'shorten=http://example.com/some/long/url' <a href="{{.RootURL}}">{{.RootURL}}</a>
|
||||
# Shorten a URL
|
||||
curl -F'shorten=http://example.com/some/long/url' <a href="{{.RootURL}}">{{.RootURL}}</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.
|
||||
# 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="{{.RootURL}}">{{.RootURL}}</a> | head -n 1
|
||||
# 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>
|
||||
{{end}}
|
||||
|
@ -6,16 +6,16 @@ the command line.
|
||||
|
||||
## USAGE
|
||||
|
||||
# Upload a file
|
||||
curl -F'file=@yourfile.png' {{.RootURL}}
|
||||
# Upload a file
|
||||
curl -F'file=@yourfile.png' {{.RootURL}}
|
||||
|
||||
# Shorten a URL
|
||||
curl -F'shorten=http://example.com/some/long/url' {{.RootURL}}
|
||||
# Shorten a URL
|
||||
curl -F'shorten=http://example.com/some/long/url' {{.RootURL}}
|
||||
|
||||
# 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.
|
||||
# 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' {{.RootURL}} | head -n 1
|
||||
# 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
|
||||
|
Loading…
Reference in New Issue
Block a user