Fix: aliyun-oss-sdk will url's '/' to '%2f' (#1117 #1705)

Fix the error of:
1. make download file with real file-name avaliable,
2. fix some signature error if sign url on AWS v4 at cdn sides, etc., rather than Cloudreve.
This commit is contained in:
Darren Yu 2023-11-25 14:47:31 +08:00 committed by GitHub
parent 88409cc1f0
commit 237d9b8d92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -403,7 +403,7 @@ func (handler *Driver) signSourceURL(ctx context.Context, path string, ttl int64
finalURL.Scheme = cdnURL.Scheme
}
return finalURL.String(), nil
return strings.Replace(finalURL.String(), "%2F", "/", -1), nil
}
// Token 获取上传策略和认证Token