使用环境
- Windows 11
- PicGo 2.3.1
- Typora 1.2.5
- 图床 sm.ms
问题描述
在搭建好环境之后,在Typroa里面验证图片上传选项,显示失败。
查看日志
2023-09-06 09:51:23 [PicGo INFO] [PicGo Server] is listening at 36677
2023-09-06 09:51:28 [PicGo INFO] [PicGo Server] get the request {"list":["C:\\Users\\mw080\\AppData\\Local\\Temp/typora-icon2.png","C:\\Users\\mw080\\AppData\\Local\\Temp/typora-icon.png"]}
2023-09-06 09:51:28 [PicGo INFO] [PicGo Server] upload files in list
2023-09-06 09:51:28 [PicGo INFO] Before transform
2023-09-06 09:51:28 [PicGo INFO] Transforming... Current transformer is [path]
2023-09-06 09:51:28 [PicGo INFO] Before upload
2023-09-06 09:51:28 [PicGo INFO] beforeUploadPlugins: renameFn running
2023-09-06 09:51:28 [PicGo INFO] Uploading... Current uploader is [smms]
2023-09-06 09:51:29 [PicGo ERROR]
------Error Stack Begin------
Error: [object Object]at Object.ve [as handle] (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:18695)at processTicksAndRejections (node:internal/process/task_queues:96:5)at async $e.doUpload (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:17198)at async $e.start (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:15969)at async Tt.upload (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:71270)at async Object.upload (C:\Program Files\PicGo\resources\app.asar\background.js:2:653584)at async jn (C:\Program Files\PicGo\resources\app.asar\background.js:2:656251)at async C:\Program Files\PicGo\resources\app.asar\background.js:2:657340
-------Error Stack End-------
2023-09-06 09:51:29 [PicGo WARN] failed
去PicGo官方Issues搜索关键字 “resources\app.asar\background.js:2:657340” 得到如下解释:
用来测试的 typora-icon2.png 和 typora-icon.png 这两张图片被sm.ms封禁了。
原文地址:https://github.com/Molunerfinn/PicGo/issues/1171
既然原因找到了,在文章中插入一张自己的图片,成功上传,问题解决。
2023-09-06 10:02:52 [PicGo INFO] [PicGo Server] get the request {"list":["C:\\Users\\mw080\\Pictures\\MdImages\\image-20230906102633159.png"]}
2023-09-06 10:02:52 [PicGo INFO] [PicGo Server] upload files in list
2023-09-06 10:02:52 [PicGo INFO] Before transform
2023-09-06 10:02:52 [PicGo INFO] Transforming... Current transformer is [path]
2023-09-06 10:02:52 [PicGo INFO] Before upload
2023-09-06 10:02:52 [PicGo INFO] beforeUploadPlugins: renameFn running
2023-09-06 10:02:52 [PicGo INFO] Uploading... Current uploader is [smms]
2023-09-06 10:02:55 [PicGo SUCCESS] https://s2.loli.net/2023/09/06/image-20230906102633159.png.png
2023-09-06 10:02:55 [PicGo INFO] [PicGo Server] upload result https://s2.loli.net/2023/09/06/image-20230906102633159.png.png