Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 使用web-upload插件+typora,图片返回地址自动转义,导致上传成功,但typora中无法显示 #996

Closed
3 tasks done
coco721 opened this issue Oct 24, 2022 · 5 comments
Assignees

Comments

@coco721
Copy link

coco721 commented Oct 24, 2022

前置阅读 | Pre-reading

PicGo的版本 | PicGo Version

v2.3.1-beta.7

系统信息 | System Information

Windows

问题重现 | Bug reproduce

使用typora配合web-upload插件实现markdown中自动上传。
typora中没有开启自动转义,在typora中复制图片后,picgo提示上传成功,但返回的地址是经过转义的地址,导致typora中无法显示;同一张图片在typora中多次复制,有时链接地址会变为没有转义的,但此时picgo提示上传失败。

picgo更换2.3.0版本后,错误消失,一切正常。

相关日志 | Logs

-------Error Stack End-------
2022-10-24 14:23:51 [PicGo INFO] [PicGo Server] upload result
2022-10-24 14:23:51 [PicGo WARN] [PicGo Server] upload failed, see picgo.log for more detail ↑
2022-10-24 14:24:15 [PicGo INFO] [PicGo Server] get the request
2022-10-24 14:24:15 [PicGo INFO] [PicGo Server] upload clipboard file
2022-10-24 14:24:16 [PicGo INFO] Before transform
2022-10-24 14:24:16 [PicGo INFO] Transforming... Current transformer is [path]
2022-10-24 14:24:16 [PicGo INFO] Before upload
2022-10-24 14:24:16 [PicGo INFO] beforeUploadPlugins: renameFn running
2022-10-24 14:24:16 [PicGo INFO] Uploading... Current uploader is [web-uploader]
2022-10-24 14:24:16 [PicGo SUCCESS]
http%3A%2F%2F192.168.10.53%2Fi%2F2022%2F10%2F24%2Fnjwts4-3.png
2022-10-24 14:24:16 [PicGo INFO] [PicGo Server] upload result: http%3A%2F%2F192.168.10.53%2Fi%2F2022%2F10%2F24%2Fnjwts4-3.png
2022-10-24 14:24:21 [PicGo INFO] [PicGo Server] get the request
2022-10-24 14:24:21 [PicGo INFO] [PicGo Server] upload clipboard file
2022-10-24 14:24:21 [PicGo INFO] Before transform
2022-10-24 14:24:21 [PicGo INFO] Transforming... Current transformer is [path]
2022-10-24 14:24:21 [PicGo INFO] Before upload
2022-10-24 14:24:21 [PicGo INFO] beforeUploadPlugins: renameFn running
2022-10-24 14:24:21 [PicGo INFO] Uploading... Current uploader is [web-uploader]
2022-10-24 14:24:21 [PicGo SUCCESS]
http%3A%2F%2F192.168.10.53%2Fi%2F2022%2F10%2F24%2Fnjxsom-3.png
2022-10-24 14:24:21 [PicGo INFO] [PicGo Server] upload result: http%3A%2F%2F192.168.10.53%2Fi%2F2022%2F10%2F24%2Fnjxsom-3.png
2022-10-24 14:24:55 [PicGo INFO] [PicGo Server] get the request
2022-10-24 14:24:55 [PicGo INFO] [PicGo Server] upload clipboard file
2022-10-24 14:24:56 [PicGo INFO] Before transform
2022-10-24 14:24:56 [PicGo INFO] Transforming... Current transformer is [path]
2022-10-24 14:24:56 [PicGo INFO] Before upload
2022-10-24 14:24:56 [PicGo INFO] beforeUploadPlugins: renameFn running
2022-10-24 14:24:56 [PicGo INFO] Uploading... Current uploader is [web-uploader]
2022-10-24 14:24:56 [PicGo SUCCESS]
http%3A%2F%2F192.168.10.53%2Fi%2F2022%2F10%2F24%2Fnk5fj8-3.png
2022-10-24 14:24:56 [PicGo INFO] [PicGo Server] upload result: http%3A%2F%2F192.168.10.53%2Fi%2F2022%2F10%2F24%2Fnk5fj8-3.png
2022-10-24 14:25:13 [PicGo INFO] [PicGo Server] shutdown
2022-10-24 14:31:16 [PicGo INFO] [PicGo Server] is listening at 36677
2022-10-24 14:32:25 [PicGo INFO] [PicGo Server] get the request {"list":["C:\Users\80469\Desktop\捕获.PNG"]}
2022-10-24 14:32:25 [PicGo INFO] [PicGo Server] upload files in list
2022-10-24 14:32:25 [PicGo INFO] Before transform
2022-10-24 14:32:25 [PicGo INFO] Transforming... Current transformer is [path]
2022-10-24 14:32:25 [PicGo INFO] Before upload
2022-10-24 14:32:25 [PicGo INFO] beforeUploadPlugins: renameFn running
2022-10-24 14:32:25 [PicGo INFO] Uploading... Current uploader is [web-uploader]
2022-10-24 14:32:25 [PicGo SUCCESS]
http%3A%2F%2F192.168.10.53%2Fi%2F2022%2F10%2F24%2Fnoq7gp-3.png
2022-10-24 14:32:26 [PicGo INFO] [PicGo Server] upload result http%3A%2F%2F192.168.10.53%2Fi%2F2022%2F10%2F24%2Fnoq7gp-3.png
2022-10-24 14:35:18 [PicGo INFO] [PicGo Server] get the request {"list":["C:\Users\80469\Desktop\捕获.PNG"]}
2022-10-24 14:35:18 [PicGo INFO] [PicGo Server] upload files in list
2022-10-24 14:35:18 [PicGo INFO] Before transform
2022-10-24 14:35:18 [PicGo INFO] Transforming... Current transformer is [path]
2022-10-24 14:35:18 [PicGo INFO] Before upload
2022-10-24 14:35:18 [PicGo INFO] beforeUploadPlugins: renameFn running
2022-10-24 14:35:18 [PicGo INFO] Uploading... Current uploader is [web-uploader]
2022-10-24 14:35:18 [PicGo SUCCESS]
http%3A%2F%2F192.168.10.53%2Fi%2F2022%2F10%2F24%2Fnqh1zi-3.png
2022-10-24 14:35:18 [PicGo INFO] [PicGo Server] upload result http%3A%2F%2F192.168.10.53%2Fi%2F2022%2F10%2F24%2Fnqh1zi-3.png
2022-10-24 14:35:31 [PicGo INFO] [PicGo Server] get the request {"list":["http://192.168.10.53/i/2022/10/24/nqh1zi-3.png"]}
2022-10-24 14:35:31 [PicGo INFO] [PicGo Server] upload files in list
2022-10-24 14:35:31 [PicGo INFO] Before transform
2022-10-24 14:35:31 [PicGo INFO] Transforming... Current transformer is [path]
2022-10-24 14:35:31 [PicGo WARN] failed
2022-10-24 14:35:31 [PicGo ERROR]
------Error Stack Begin------
Error: request http%3A%2F%2F192.168.10.53%2Fi%2F2022%2F10%2F24%2Fnqh1zi-3.png error, connect ECONNREFUSED 127.0.0.1:80
at C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:38098
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 0)
at async Object.handle (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:37092)
at async $e.doTransform (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:16669)
at async $e.start (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:15906)
at async Tt.upload (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:70812)
at async Object.upload (C:\Program Files\PicGo\resources\app.asar\background.js:2:649543)
at async In (C:\Program Files\PicGo\resources\app.asar\background.js:2:652443)
at async C:\Program Files\PicGo\resources\app.asar\background.js:2:653532
-------Error Stack End-------
2022-10-24 14:35:31 [PicGo ERROR]
------Error Stack Begin------
Error: request http%3A%2F%2F192.168.10.53%2Fi%2F2022%2F10%2F24%2Fnqh1zi-3.png error, connect ECONNREFUSED 127.0.0.1:80
at C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:38098
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 0)
at async Object.handle (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:37092)
at async $e.doTransform (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:16669)
at async $e.start (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:15906)
at async Tt.upload (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:70812)
at async Object.upload (C:\Program Files\PicGo\resources\app.asar\background.js:2:649543)
at async In (C:\Program Files\PicGo\resources\app.asar\background.js:2:652443)
at async C:\Program Files\PicGo\resources\app.asar\background.js:2:653532
-------Error Stack End-------
2022-10-24 14:35:31 [PicGo INFO] [PicGo Server] upload result
2022-10-24 14:35:31 [PicGo WARN] [PicGo Server] upload failed, see picgo.log for more detail ↑
2022-10-24 14:35:42 [PicGo INFO] [PicGo Server] get the request {"list":["http://192.168.10.53/i/2022/10/24/nqh1zi-3.png"]}
2022-10-24 14:35:42 [PicGo INFO] [PicGo Server] upload files in list
2022-10-24 14:35:42 [PicGo INFO] Before transform
2022-10-24 14:35:42 [PicGo INFO] Transforming... Current transformer is [path]
2022-10-24 14:35:42 [PicGo WARN] failed
2022-10-24 14:35:42 [PicGo ERROR]
------Error Stack Begin------
Error: request http%3A%2F%2F192.168.10.53%2Fi%2F2022%2F10%2F24%2Fnqh1zi-3.png error, connect ECONNREFUSED 127.0.0.1:80
at C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:38098
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 0)
at async Object.handle (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:37092)
at async $e.doTransform (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:16669)
at async $e.start (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:15906)
at async Tt.upload (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:70812)
at async Object.upload (C:\Program Files\PicGo\resources\app.asar\background.js:2:649543)
at async In (C:\Program Files\PicGo\resources\app.asar\background.js:2:652443)
at async C:\Program Files\PicGo\resources\app.asar\background.js:2:653532
-------Error Stack End-------
2022-10-24 14:35:42 [PicGo ERROR]
------Error Stack Begin------
Error: request http%3A%2F%2F192.168.10.53%2Fi%2F2022%2F10%2F24%2Fnqh1zi-3.png error, connect ECONNREFUSED 127.0.0.1:80
at C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:38098
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 0)
at async Object.handle (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:37092)
at async $e.doTransform (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:16669)
at async $e.start (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:15906)
at async Tt.upload (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:70812)
at async Object.upload (C:\Program Files\PicGo\resources\app.asar\background.js:2:649543)
at async In (C:\Program Files\PicGo\resources\app.asar\background.js:2:652443)
at async C:\Program Files\PicGo\resources\app.asar\background.js:2:653532
-------Error Stack End-------
2022-10-24 14:35:42 [PicGo INFO] [PicGo Server] upload result
2022-10-24 14:35:42 [PicGo WARN] [PicGo Server] upload failed, see picgo.log for more detail ↑

@Molunerfinn
Copy link
Owner

这里确实会有个encode的问题,需要处理一下

@Molunerfinn
Copy link
Owner

可以先使用旧版本。下个版本会修复这个问题

@ghost
Copy link

ghost commented Oct 24, 2022

同样问题,滚回2.3.0了

@Molunerfinn
Copy link
Owner

beta-8 已更新

@chenguo-design
Copy link

+1,我也是v2.3.1-beta.7版本,也遇到这个问题了。开始我还以为时Typora的问题,看了日志发现是picgo返回就有问题(但是上传成功后剪切板的url是没有被转义的),那就升版本吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants