Skip to content

Commit 8572c1c

Browse files
committed
🐛 Fix: tencent cos url encode bug
1 parent 42128f2 commit 8572c1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plugins/uploader/tcyun.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const postOptions = (options: ITcyunConfig, fileName: string, signature: ISignat
7575

7676
return {
7777
method: 'PUT',
78-
url: `http://${options.bucket}.${endpoint}/${encodeURIComponent(path)}${encodeURIComponent(fileName)}`,
78+
url: `http://${options.bucket}.${endpoint}/${encodeURI(path)}${encodeURIComponent(fileName)}`,
7979
headers: {
8080
Host: `${options.bucket}.${endpoint}`,
8181
Authorization: `q-sign-algorithm=sha1&q-ak=${options.secretId}&q-sign-time=${signature.signTime}&q-key-time=${signature.signTime}&q-header-list=host&q-url-param-list=&q-signature=${signature.signature}`,

0 commit comments

Comments
 (0)