forked from electricdusk/rushlink
Rename --host => --root-url
This commit is contained in:
@@ -7,10 +7,10 @@ the command line.
|
||||
## USAGE
|
||||
|
||||
# Upload a file
|
||||
curl -F'file=@yourfile.png' {{.Host}}
|
||||
curl -F'file=@yourfile.png' {{.RootURL}}
|
||||
|
||||
# Shorten a URL
|
||||
curl -F'shorten=http://example.com/some/long/url' {{.Host}}
|
||||
curl -F'shorten=http://example.com/some/long/url' {{.RootURL}}
|
||||
|
||||
# The first line of the result will contain the shortened URL.
|
||||
#
|
||||
@@ -18,4 +18,4 @@ the command line.
|
||||
# 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' {{.Host}} | head -n 1
|
||||
curl -F'file=@yourfile.png' {{.RootURL}} | head -n 1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{.Host}}/{{.Paste.Key}}{{.FileExt}}
|
||||
{{.RootURL}}/{{.Paste.Key}}{{.FileExt}}
|
||||
---
|
||||
{{if and (ne .Paste.State.String "deleted") .CanDeleteBool}}
|
||||
with delete token: {{.Host}}/{{.Paste.Key}}{{.FileExt}}?deleteToken={{.Request.URL.Query.Get "deleteToken"}}
|
||||
with delete token: {{.RootURL}}/{{.Paste.Key}}{{.FileExt}}?deleteToken={{.Paste.DeleteToken}}
|
||||
{{else -}}
|
||||
with delete token: <unknown>
|
||||
{{end -}}type: {{.Paste.Type}}
|
||||
@@ -16,6 +16,6 @@ delete token: {{.CanDelete}}
|
||||
{{if and (ne .Paste.State.String "deleted") .CanDeleteBool}}
|
||||
```
|
||||
# To delete this {{.Paste.Type}}, execute:
|
||||
curl --request "DELETE" "{{.Host}}/{{.Paste.Key}}{{.FileExt}}?deleteToken={{.Paste.DeleteToken}}"
|
||||
curl --request "DELETE" "{{.RootURL}}/{{.Paste.Key}}{{.FileExt}}?deleteToken={{.Paste.DeleteToken}}"
|
||||
```
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user