mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-02-08 21:38:13 -05:00
Fixed: imgList error
This commit is contained in:
parent
f657026820
commit
7364ea6ddf
@ -44,17 +44,17 @@ const weiboUpload = async function (img, type, webContents) {
|
|||||||
}
|
}
|
||||||
webContents.send('uploadProgress', 60)
|
webContents.send('uploadProgress', 60)
|
||||||
const imgList = await img2Base64[type](img)
|
const imgList = await img2Base64[type](img)
|
||||||
let opt = {
|
|
||||||
formData: {
|
|
||||||
b64_data: imgList[i].base64Image
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (chooseCookie) {
|
|
||||||
opt.headers = {
|
|
||||||
Cookie: cookie
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (let i in imgList) {
|
for (let i in imgList) {
|
||||||
|
let opt = {
|
||||||
|
formData: {
|
||||||
|
b64_data: imgList[i].base64Image
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (chooseCookie) {
|
||||||
|
opt.headers = {
|
||||||
|
Cookie: cookie
|
||||||
|
}
|
||||||
|
}
|
||||||
let result = await rp.post(UPLOAD_URL, opt)
|
let result = await rp.post(UPLOAD_URL, opt)
|
||||||
result = result.replace(/<.*?\/>/, '').replace(/<(\w+).*?>.*?<\/\1>/, '')
|
result = result.replace(/<.*?\/>/, '').replace(/<(\w+).*?>.*?<\/\1>/, '')
|
||||||
delete imgList[i].base64Image
|
delete imgList[i].base64Image
|
||||||
|
Loading…
Reference in New Issue
Block a user