diff --git a/main.go b/main.go index 7edd3ea..a4e7861 100644 --- a/main.go +++ b/main.go @@ -38,11 +38,16 @@ func randomID(n int) string { func indexHandler(w http.ResponseWriter, r *http.Request) { w.Header().Add("Content-Type", "text/html") fmt.Fprintf(w, `
Welcome to slenpaste! -Upload via curl: - curl -F 'file=@yourfile.txt' http://%s/ -Or via wget: - wget --method=POST --body-file=yourfile.txt http://%s/ +Upload a file: + curl -F 'file=@yourfile.txt' -F 'expiry=1h' http://%s/ + +Upload from stdin (no file param, expire after 5m): + curl --data-binary @- http://%s/?expiry=5m < yourfile.txt + +Upload from stdin and expire on first view: + cat yourfile.txt | curl --data-binary @- "http://%s/?expiry=view" +-`, domain, domain) +