cmd/uplink: properly path escape shares
Fixes #3829 Change-Id: I0f900a392239fcc064cea968fc7a5bc373ee26a1
This commit is contained in:
parent
31b322f07e
commit
f93d764998
@ -6,6 +6,7 @@ package cmd
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/url"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
@ -149,10 +150,14 @@ func shareMain(cmd *cobra.Command, args []string) (err error) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Println("URL :", fmt.Sprintf("%s/%s/%s/%s", shareCfg.BaseURL, newAccessData, p.Bucket(), p.Path()))
|
||||
fmt.Println("URL :", fmt.Sprintf("%s/%s/%s/%s", shareCfg.BaseURL,
|
||||
url.PathEscape(newAccessData),
|
||||
url.PathEscape(p.Bucket()),
|
||||
url.PathEscape(p.Path())))
|
||||
} else {
|
||||
fmt.Println("=========== BROWSER URL PREFIX ===========================================================")
|
||||
fmt.Println("URL :", fmt.Sprintf("%s/%s", shareCfg.BaseURL, newAccessData))
|
||||
fmt.Println("URL :", fmt.Sprintf("%s/%s", shareCfg.BaseURL,
|
||||
url.PathEscape(newAccessData)))
|
||||
}
|
||||
|
||||
if shareCfg.ExportTo != "" {
|
||||
|
Loading…
Reference in New Issue
Block a user