forked from electricdusk/rushlink
parent
728b5d9d4b
commit
41f4de43ac
@ -14,7 +14,12 @@ the command line.
|
||||
# Shorten a URL
|
||||
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
|
||||
curl -F'shorten=http://example.com/some/long/url' -F'deleteToken=' <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}}
|
||||
|
@ -1,3 +1,16 @@
|
||||
{{define "title"}}
|
||||
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}}
|
@ -1,3 +1,16 @@
|
||||
{{define "title"}}
|
||||
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}}
|
@ -12,5 +12,10 @@ the command line.
|
||||
# Shorten a URL
|
||||
curl -F'shorten=http://example.com/some/long/url' https://{{.Request.Host}}
|
||||
|
||||
# Shorten a URL with a token to delete it later
|
||||
curl -F'shorten=http://example.com/some/long/url' -F'deleteToken=' https://{{.Request.Host}}
|
||||
# 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' 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}}
|
||||
{{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}}
|
||||
{{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