Closed Pil0tXia closed 2 years ago
重复issue:#996
我没有使用web-upload插件
都是url encode的问题,跟插件没关系
好的谢谢
另外有关问题二,请问可以解决吗?
打开MIUI+ - 我的应用 - 文件管理,直接从该页面拖动图片到typora中,图片在上传前的本地路径为C:\Users{UserName}\AppData\Roaming\MI\MiScreenShare\Drop,随后报错。问题1、2的log附在后面。
不清楚MIUI的的图片路径存放逻辑。理论上,如果你正常拖拽系统图片能够上传,那么说明PicGo读取文件上传的能力是正常的。我看你的日志里,你这个图片路径理论上都不是合法的路径,PicGo读不到也是正常的啊
是我替换了用户名。原log如下:
2022-10-24 15:09:57 [PicGo INFO] [PicGo Server] upload result https%3A%2F%2Fcdn.jsdelivr.net%2Fgh%2FPil0tXia%2Fimghost%2Fpicgo%2FIMG_20221024_150901.jpg
2022-10-24 15:20:02 [PicGo INFO] [PicGo Server] get the request {"list":["C:\\Users\\18377\\AppData\\Roaming\\MI\\MiScreenShare\\Drop\\IMG_20221024_151827.jpg"]}
2022-10-24 15:20:02 [PicGo INFO] [PicGo Server] upload files in list
2022-10-24 15:20:02 [PicGo INFO] Before transform
2022-10-24 15:20:02 [PicGo INFO] Transforming... Current transformer is [path]
2022-10-24 15:20:02 [PicGo WARN] failed
2022-10-24 15:20:02 [PicGo ERROR]
------Error Stack Begin------
Error: read file C:\Users\18377\AppData\Roaming\MI\MiScreenShare\Drop\IMG_20221024_151827.jpg error
at C:\Users\18377\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:38098
at async Promise.all (index 0)
at async Object.handle (C:\Users\18377\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:37092)
at async $e.doTransform (C:\Users\18377\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:16669)
at async $e.start (C:\Users\18377\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:15906)
at async Tt.upload (C:\Users\18377\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:70812)
at async Object.upload (C:\Users\18377\AppData\Local\Programs\PicGo\resources\app.asar\background.js:2:649543)
at async In (C:\Users\18377\AppData\Local\Programs\PicGo\resources\app.asar\background.js:2:652443)
at async C:\Users\18377\AppData\Local\Programs\PicGo\resources\app.asar\background.js:2:653532
-------Error Stack End-------
2022-10-24 15:20:02 [PicGo ERROR]
------Error Stack Begin------
Error: read file C:\Users\18377\AppData\Roaming\MI\MiScreenShare\Drop\IMG_20221024_151827.jpg error
at C:\Users\18377\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:38098
at async Promise.all (index 0)
at async Object.handle (C:\Users\18377\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:37092)
at async $e.doTransform (C:\Users\18377\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:16669)
at async $e.start (C:\Users\18377\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:15906)
at async Tt.upload (C:\Users\18377\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:70812)
at async Object.upload (C:\Users\18377\AppData\Local\Programs\PicGo\resources\app.asar\background.js:2:649543)
at async In (C:\Users\18377\AppData\Local\Programs\PicGo\resources\app.asar\background.js:2:652443)
at async C:\Users\18377\AppData\Local\Programs\PicGo\resources\app.asar\background.js:2:653532
-------Error Stack End-------
你直接去这个目录拖拽相关图片上传呢。也有可能PicGo没有读取权限。
这个目录是空的
那不完事了- -
好的,我去找小米🤣
前置阅读 | Pre-reading
PicGo的版本 | PicGo Version
2.3.1 beta7
系统信息 | System Information
Windows
问题重现 | Bug reproduce
C:\Users\{UserName}\AppData\Roaming\MI\MiScreenShare\Edit
中,随后从文件资源管理器拖动图片进入typora,typora上传后得到的url为诸如![IMG_20221024_151827](https%253A%252F%252Fcdn.jsdelivr.net%252Fgh%252FPil0tXia%252Fimghost%252Fpicgo%252FIMG_20221024_151827.jpg)
这种被转义的格式,且无法正常显示。手动从picgo相册中复制链接,格式正确且正常显示。C:\Users\{UserName}\AppData\Roaming\MI\MiScreenShare\Drop
,随后报错。问题1、2的log附在后面。win11 22621.674 MIUI+ 2.5.5.643 红米K40 MIUI 13.0.7
相关日志 | Logs
------Error Stack Begin------ Error: read file C:\Users{UserName}\AppData\Roaming\MI\MiScreenShare\Drop\IMG_20221024_150901.jpg error at C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:38098 at async Promise.all (index 0) at async Object.handle (C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:37092) at async $e.doTransform (C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:16669) at async $e.start (C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:15906) at async Tt.upload (C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:70812) at async Object.upload (C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\background.js:2:649543) at async In (C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\background.js:2:652443) at async C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\background.js:2:653532 -------Error Stack End------- 2022-10-24 15:09:28 [PicGo INFO] [PicGo Server] upload result
2022-10-24 15:09:28 [PicGo WARN] [PicGo Server] upload failed, see picgo.log for more detail ↑ 2022-10-24 15:09:52 [PicGo INFO] [PicGo Server] get the request {"list":["C:\Users\{UserName}\AppData\Roaming\MI\MiScreenShare\Edit\IMG_20221024_150901.jpg"]} 2022-10-24 15:09:52 [PicGo INFO] [PicGo Server] upload files in list 2022-10-24 15:09:52 [PicGo INFO] Before transform 2022-10-24 15:09:52 [PicGo INFO] Transforming... Current transformer is [path] 2022-10-24 15:09:52 [PicGo INFO] Before upload 2022-10-24 15:09:52 [PicGo INFO] beforeUploadPlugins: renameFn running 2022-10-24 15:09:52 [PicGo INFO] Uploading... Current uploader is [github] 2022-10-24 15:09:57 [PicGo SUCCESS] https%3A%2F%2Fcdn.jsdelivr.net%2Fgh%2FPil0tXia%2Fimghost%2Fpicgo%2FIMG_20221024_150901.jpg 2022-10-24 15:09:57 [PicGo INFO] [PicGo Server] upload result https%3A%2F%2Fcdn.jsdelivr.net%2Fgh%2FPil0tXia%2Fimghost%2Fpicgo%2FIMG_20221024_150901.jpg 2022-10-24 15:20:02 [PicGo INFO] [PicGo Server] get the request {"list":["C:\Users\{UserName}\AppData\Roaming\MI\MiScreenShare\Drop\IMG_20221024_151827.jpg"]} 2022-10-24 15:20:02 [PicGo INFO] [PicGo Server] upload files in list 2022-10-24 15:20:02 [PicGo INFO] Before transform 2022-10-24 15:20:02 [PicGo INFO] Transforming... Current transformer is [path] 2022-10-24 15:20:02 [PicGo WARN] failed 2022-10-24 15:20:02 [PicGo ERROR] ------Error Stack Begin------ Error: read file C:\Users{UserName}\AppData\Roaming\MI\MiScreenShare\Drop\IMG_20221024_151827.jpg error at C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:38098 at async Promise.all (index 0) at async Object.handle (C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:37092) at async $e.doTransform (C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:16669) at async $e.start (C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:15906) at async Tt.upload (C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:70812) at async Object.upload (C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\background.js:2:649543) at async In (C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\background.js:2:652443) at async C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\background.js:2:653532 -------Error Stack End------- 2022-10-24 15:20:02 [PicGo ERROR] ------Error Stack Begin------ Error: read file C:\Users{UserName}\AppData\Roaming\MI\MiScreenShare\Drop\IMG_20221024_151827.jpg error at C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:38098 at async Promise.all (index 0) at async Object.handle (C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:37092) at async $e.doTransform (C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:16669) at async $e.start (C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:15906) at async Tt.upload (C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:70812) at async Object.upload (C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\background.js:2:649543) at async In (C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\background.js:2:652443) at async C:\Users{UserName}\AppData\Local\Programs\PicGo\resources\app.asar\background.js:2:653532 -------Error Stack End------- 2022-10-24 15:20:02 [PicGo INFO] [PicGo Server] upload result
2022-10-24 15:20:02 [PicGo WARN] [PicGo Server] upload failed, see picgo.log for more detail ↑