mirror of
https://github.com/rclone/rclone.git
synced 2024-12-23 07:29:35 +01:00
b2: fix rclone link when object path contains special characters
Before this change, b2 would return an error when opening a link generated by `rclone link`. The following error occurs when the object path contains an ampersand that is not percent encoded: { "code": "bad_request", "message": "Bad character in percent-encoded string: 38 (0x26)", "status": 400 }
This commit is contained in:
parent
85c29e3629
commit
7821cb884d
@ -1426,7 +1426,7 @@ func (f *Fs) PublicLink(ctx context.Context, remote string, expire fs.Duration,
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
absPath := "/" + bucketPath
|
||||
absPath := "/" + urlEncode(bucketPath)
|
||||
link = RootURL + "/file/" + urlEncode(bucket) + absPath
|
||||
bucketType, err := f.getbucketType(ctx, bucket)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user