From f2e3eebbac9447e439fe0ded4f44ada78421b89c Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Mon, 12 Dec 2022 15:44:37 +0100 Subject: [PATCH] Put progress bar on Stderr in order to have the URL output pipeable Signed-off-by: Knut Ahlers --- upload.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/upload.go b/upload.go index 3728044..364b3dc 100644 --- a/upload.go +++ b/upload.go @@ -9,6 +9,7 @@ import ( "io" "io/ioutil" "mime" + "os" "path" "strings" "time" @@ -73,6 +74,7 @@ func executeUpload(inFileName string, inFileHandle io.ReadSeeker, useCalculatedF if cfg.Progress { bar := pb.New64(ps.Size).Prefix(inFileName).SetUnits(pb.U_BYTES) + bar.Output = os.Stderr bar.Start() barUpdate := true