🐛 Fix: fix upload failed error of aliyun upyun and github

This commit is contained in:
萌萌哒赫萝
2023-08-31 07:21:14 -07:00
parent 0eb7bacb84
commit 320ac73b90
3 changed files with 6 additions and 6 deletions

View File

@@ -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')