From 237d9b8d923754e681d01c21cd036542add6618e Mon Sep 17 00:00:00 2001 From: Darren Yu Date: Sat, 25 Nov 2023 14:47:31 +0800 Subject: [PATCH] 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. --- pkg/filesystem/driver/oss/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/filesystem/driver/oss/handler.go b/pkg/filesystem/driver/oss/handler.go index 2ae50a375e..da6848a636 100644 --- a/pkg/filesystem/driver/oss/handler.go +++ b/pkg/filesystem/driver/oss/handler.go @@ -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