mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-02-02 11:08:13 -05:00
Fixed: imgList error
This commit is contained in:
parent
f657026820
commit
7364ea6ddf
@ -44,6 +44,7 @@ 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)
|
||||||
|
for (let i in imgList) {
|
||||||
let opt = {
|
let opt = {
|
||||||
formData: {
|
formData: {
|
||||||
b64_data: imgList[i].base64Image
|
b64_data: imgList[i].base64Image
|
||||||
@ -54,7 +55,6 @@ const weiboUpload = async function (img, type, webContents) {
|
|||||||
Cookie: cookie
|
Cookie: cookie
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (let i in imgList) {
|
|
||||||
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