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]: 从MIUI+获取的图片无法正常在typora中上传 #997

Closed
3 tasks done
Pil0tXia opened this issue Oct 24, 2022 · 11 comments
Closed
3 tasks done

[Bug]: 从MIUI+获取的图片无法正常在typora中上传 #997

Pil0tXia opened this issue Oct 24, 2022 · 11 comments
Assignees
Labels

Comments

@Pil0tXia
Copy link

前置阅读 | Pre-reading

PicGo的版本 | PicGo Version

2.3.1 beta7

系统信息 | System Information

Windows

问题重现 | Bug reproduce

image

  1. 打开MIUI+ - 我的应用 - 文件管理,在其中双击图片,图片将被保存在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相册中复制链接,格式正确且正常显示。
  2. 打开MIUI+ - 我的应用 - 文件管理,直接从该页面拖动图片到typora中,图片在上传前的本地路径为C:\Users\{UserName}\AppData\Roaming\MI\MiScreenShare\Drop,随后报错。问题1、2的log附在后面。
    image
  3. 类似的操作还有:从MIUI+主界面-最近文件中拖拽图片

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 ↑

@Molunerfinn
Copy link
Owner

重复issue:#996

@Pil0tXia
Copy link
Author

我没有使用web-upload插件
image

@Molunerfinn
Copy link
Owner

都是url encode的问题,跟插件没关系

@Pil0tXia
Copy link
Author

好的谢谢

@Pil0tXia
Copy link
Author

另外有关问题二,请问可以解决吗?

打开MIUI+ - 我的应用 - 文件管理,直接从该页面拖动图片到typora中,图片在上传前的本地路径为C:\Users{UserName}\AppData\Roaming\MI\MiScreenShare\Drop,随后报错。问题1、2的log附在后面。

@Molunerfinn
Copy link
Owner

不清楚MIUI的的图片路径存放逻辑。理论上,如果你正常拖拽系统图片能够上传,那么说明PicGo读取文件上传的能力是正常的。我看你的日志里,你这个图片路径理论上都不是合法的路径,PicGo读不到也是正常的啊

image

@Pil0tXia
Copy link
Author

是我替换了用户名。原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------- 

@Molunerfinn
Copy link
Owner

你直接去这个目录拖拽相关图片上传呢。也有可能PicGo没有读取权限。

@Pil0tXia
Copy link
Author

这个目录是空的

@Molunerfinn
Copy link
Owner

那不完事了- -

@Pil0tXia
Copy link
Author

好的,我去找小米🤣

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

No branches or pull requests

2 participants