From 095348d614dc6d0bdd53cbf3347652e67b8af244 Mon Sep 17 00:00:00 2001 From: Daan Sprenkels Date: Thu, 19 Dec 2019 23:29:09 +0100 Subject: [PATCH] web: Add an example w/ upload from process output Fixes #35 --- assets/templates/html/index.html.tmpl | 3 +++ assets/templates/txt/index.txt.tmpl | 3 +++ 2 files changed, 6 insertions(+) diff --git a/assets/templates/html/index.html.tmpl b/assets/templates/html/index.html.tmpl index 80da6a7..676b6d4 100644 --- a/assets/templates/html/index.html.tmpl +++ b/assets/templates/html/index.html.tmpl @@ -38,6 +38,9 @@ curl -F'shorten=http://example.com/some/long/url' {{.Root # In the other lines, you will find other information, including # information on how to delete the shortened object. +# Upload output from another process +figlet Rushlink | curl -F'file=@-' {{.RootURL}} + # 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 diff --git a/assets/templates/txt/index.txt.tmpl b/assets/templates/txt/index.txt.tmpl index f7973c1..322a68b 100644 --- a/assets/templates/txt/index.txt.tmpl +++ b/assets/templates/txt/index.txt.tmpl @@ -17,5 +17,8 @@ curl -F'shorten=http://example.com/some/long/url' {{.RootURL}} # In the other lines, you will find other information, including # information on how to delete the shortened object. +# Upload output from another process +figlet Rushlink | curl -F'file=@-' {{.RootURL}} + # 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