Skip to content

Commit

Permalink
🐛 Fix: tencent cos UA bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Molunerfinn committed Apr 6, 2023
1 parent 527d19e commit cb64d84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/uploader/tcyun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const postOptions = (options: ITcyunConfig, fileName: string, signature: ISignat
Host: `${area}.file.myqcloud.com`,
Authorization: signature.signature,
contentType: 'multipart/form-data',
userAgent: `PicGo;${version};null;null`
'User-Agent': `PicGo;${version};null;null`
},
formData: {
op: 'upload',
Expand All @@ -76,7 +76,7 @@ const postOptions = (options: ITcyunConfig, fileName: string, signature: ISignat
Host: `${options.bucket}.cos.${options.area}.myqcloud.com`,
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}`,
contentType: mime.lookup(fileName),
userAgent: `PicGo;${version};null;null`
'User-Agent': `PicGo;${version};null;null`
},
body: image,
resolveWithFullResponse: true
Expand Down

0 comments on commit cb64d84

Please sign in to comment.