From 320ac73b906d06c96b8bb90c598c42b95c7ddaf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=8C=E8=90=8C=E5=93=92=E8=B5=AB=E8=90=9D?= Date: Thu, 31 Aug 2023 07:21:14 -0700 Subject: [PATCH] :bug: Fix: fix upload failed error of aliyun upyun and github --- package.json | 2 +- src/main/manage/apis/upyun.ts | 2 +- yarn.lock | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index d3b1b6e..b03660e 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "mitt": "^3.0.1", "node-ssh-no-cpu-features": "^1.0.1", "nodejs-file-downloader": "^4.12.1", - "piclist": "^1.0.0", + "piclist": "^1.0.1", "pinia": "^2.1.6", "pinia-plugin-persistedstate": "^3.2.0", "qiniu": "^7.9.0", diff --git a/src/main/manage/apis/upyun.ts b/src/main/manage/apis/upyun.ts index 323e437..021d3e4 100644 --- a/src/main/manage/apis/upyun.ts +++ b/src/main/manage/apis/upyun.ts @@ -59,7 +59,7 @@ class UpyunApi { } getAntiLeechParam (key: string): string { - const uri = `/${encodeURIComponent(key)}`.replace(/%2F/g, '/').replace(/^\/+/g, '/') + const uri = `/${key}`.replace(/%2F/g, '/').replace(/^\/+/g, '/') const now = Math.round(new Date().getTime() / 1000) const expire = this.expireTime ? now + parseInt(this.expireTime.toString(), 10) : now + 1800 const sign = md5(`${this.antiLeechToken}&${expire}&${uri}`, 'hex') diff --git a/yarn.lock b/yarn.lock index 946e39e..22550e5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12488,10 +12488,10 @@ performance-now@^2.1.0: resolved "https://registry.npmmirror.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== -piclist@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/piclist/-/piclist-1.0.0.tgz#71674a3905e77c9325d5cda6529e025253df15b0" - integrity sha512-8KP+9gZOCZpQOZIRIFVO/WeWv8kjY0GOo3bTskF8BAaQfUl6lJi2AkG435nVDSfKidt14v53ZfohNn3jpXX9Hg== +piclist@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/piclist/-/piclist-1.0.1.tgz#6d15ec44393de38b32ba34d041511324ec7dda55" + integrity sha512-c68ijE5Gj3E29KEc1B6F75pluldHLJvkvYmoWhNpYg1hOXGTlxepZCZm8Wp/a9NVjT8jh3zfX1fmpbFGjpOOug== dependencies: "@picgo/i18n" "^1.0.0" "@picgo/store" "^2.0.4"