Erik van Velzen
|
b4e42ceb23
|
cmd/uplinkng: fix linkshare bugs
Fix various bugs by remove superflous steps and letting libuplink
build the url.
$ uplinkng share --not-after +1h --url sj://mybucket/myprefix/
before: https://link.us1.storjshare.io/s/jxcvcme2xkb44xsec235xb2ccmbq//myprefix//
after: https://link.us1.storjshare.io/s/jxcvcme2xkb44xsec235xb2ccmbq/mybucket/myprefix/
$ uplinkng share --not-after +1h --url $(printf "sj://waterbear/aa\x03bb")
before: https://link.us1.storjshare.io/s/jwbcxjiv4ept7t2g3qmxfb73ljga//aabb
after: https://link.us1.storjshare.io/s/jvod7pixige62yrp5tubn4ct47yq/waterbear/aa%03bb
$ uplinkng share --not-after +1h --url
before: no url generated, no error
after: error "Need at least a bucket to create a working linkshare URL"
Change-Id: Ibca6847f8fc5d5fad9ee4642d11d3081d75d77ca
|
2022-03-03 16:00:10 +00:00 |
|