parent
728b5d9d4b
commit
41f4de43ac
@ -14,7 +14,12 @@ the command line.
|
|||||||
# Shorten a URL
|
# Shorten a URL
|
||||||
curl -F'shorten=http://example.com/some/long/url' <a href="//{{.Request.Host}}">https://{{.Request.Host}}</a>
|
curl -F'shorten=http://example.com/some/long/url' <a href="//{{.Request.Host}}">https://{{.Request.Host}}</a>
|
||||||
|
|
||||||
# Shorten a URL with a token to delete it later
|
# The first line of the result will contain the shortened URL.
|
||||||
curl -F'shorten=http://example.com/some/long/url' -F'deleteToken=' <a href="//{{.Request.Host}}">https://{{.Request.Host}}</a>
|
#
|
||||||
|
# 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>
|
</pre>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -1,3 +1,16 @@
|
|||||||
{{define "title"}}
|
{{define "title"}}
|
||||||
Success - rushlink
|
Success - rushlink
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{define "body"}}
|
||||||
|
<pre>
|
||||||
|
https://{{.Request.Host}}/{{.Paste.Key}}{{.FileExt}}
|
||||||
|
---
|
||||||
|
|
||||||
|
# View metadata
|
||||||
|
curl <a href="https://{{.Request.Host}}/{{.Paste.Key}}{{.FileExt}}/meta?deleteToken={{.Paste.DeleteToken | urlquery}}">https://{{.Request.Host}}/{{.Paste.Key}}{{.FileExt}}/meta?deleteToken={{.Paste.DeleteToken | urlquery}}</a>
|
||||||
|
|
||||||
|
# Delete this object
|
||||||
|
curl --request DELETE <a href="https://{{.Request.Host}}/{{.Paste.Key}}{{.FileExt}}?deleteToken={{.Paste.DeleteToken | urlquery}}">https://{{.Request.Host}}/{{.Paste.Key}}{{.FileExt}}?deleteToken={{.Paste.DeleteToken | urlquery}}</a>
|
||||||
|
</pre>
|
||||||
{{end}}
|
{{end}}
|
@ -1,3 +1,16 @@
|
|||||||
{{define "title"}}
|
{{define "title"}}
|
||||||
Success - rushlink
|
Success - rushlink
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{define "body"}}
|
||||||
|
<pre>
|
||||||
|
https://{{.Request.Host}}/{{.Paste.Key}}
|
||||||
|
---
|
||||||
|
|
||||||
|
# View metadata
|
||||||
|
curl <a href="https://{{.Request.Host}}/{{.Paste.Key}}/meta?deleteToken={{.Paste.DeleteToken | urlquery}}">https://{{.Request.Host}}/{{.Paste.Key}}/meta?deleteToken={{.Paste.DeleteToken | urlquery}}</a>
|
||||||
|
|
||||||
|
# Delete this object
|
||||||
|
curl --request DELETE <a href="https://{{.Request.Host}}/{{.Paste.Key}}?deleteToken={{.Paste.DeleteToken | urlquery}}">https://{{.Request.Host}}/{{.Paste.Key}}?deleteToken={{.Paste.DeleteToken | urlquery}}</a>
|
||||||
|
</pre>
|
||||||
{{end}}
|
{{end}}
|
@ -12,5 +12,10 @@ the command line.
|
|||||||
# Shorten a URL
|
# Shorten a URL
|
||||||
curl -F'shorten=http://example.com/some/long/url' https://{{.Request.Host}}
|
curl -F'shorten=http://example.com/some/long/url' https://{{.Request.Host}}
|
||||||
|
|
||||||
# Shorten a URL with a token to delete it later
|
# The first line of the result will contain the shortened URL.
|
||||||
curl -F'shorten=http://example.com/some/long/url' -F'deleteToken=' https://{{.Request.Host}}
|
#
|
||||||
|
# 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' https://{{.Request.Host}} | head -n 1
|
@ -1,5 +1,8 @@
|
|||||||
{{if .Request.PostForm.deleteToken -}}
|
|
||||||
https://{{.Request.Host}}/{{.Paste.Key}}{{.FileExt}}?deleteToken={{.Paste.DeleteToken | urlquery}}
|
|
||||||
{{else -}}
|
|
||||||
https://{{.Request.Host}}/{{.Paste.Key}}{{.FileExt}}
|
https://{{.Request.Host}}/{{.Paste.Key}}{{.FileExt}}
|
||||||
{{end -}}
|
---
|
||||||
|
|
||||||
|
# View metadata
|
||||||
|
curl https://{{.Request.Host}}/{{.Paste.Key}}{{.FileExt}}/meta?deleteToken={{.Paste.DeleteToken | urlquery}}
|
||||||
|
|
||||||
|
# Delete this object
|
||||||
|
curl --request DELETE https://{{.Request.Host}}/{{.Paste.Key}}{{.FileExt}}?deleteToken={{.Paste.DeleteToken | urlquery}}
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
{{if .Request.PostForm.deleteToken -}}
|
|
||||||
https://{{.Request.Host}}/{{.Paste.Key}}?deleteToken={{.Paste.DeleteToken | urlquery}}
|
|
||||||
{{else -}}
|
|
||||||
https://{{.Request.Host}}/{{.Paste.Key}}
|
https://{{.Request.Host}}/{{.Paste.Key}}
|
||||||
{{end -}}
|
---
|
||||||
|
|
||||||
|
# View metadata
|
||||||
|
curl https://{{.Request.Host}}/{{.Paste.Key}}/meta?deleteToken={{.Paste.DeleteToken | urlquery}}
|
||||||
|
|
||||||
|
# Delete this object
|
||||||
|
curl --request DELETE https://{{.Request.Host}}/{{.Paste.Key}}?deleteToken={{.Paste.DeleteToken | urlquery}}
|
||||||
|
Loading…
Reference in New Issue
Block a user