PicGo / vs-picgo

A VSCode plugin of PicGo
https://marketplace.visualstudio.com/items?itemName=Spades.vs-picgo
MIT License
368 stars 50 forks source link

smms v2 no token provided notification #65

Closed pickpikyup closed 3 years ago

pickpikyup commented 4 years ago

Describe the bug

OS: vs-picgo : 2.1.0 VS code :1.46

After installing vs-picGo, I tried to upload some pictures and do some test. When I use the hot-key "Ctrl+Alt+o / u / e" to upload a image, picGo extension works well at first. But the progress of uploading never goes to the end. No error report, no bugs, it just doesn't work.

PS : I installed it and use the default configuration BTW.

To Reproduce

  1. Go to 'myBlog.md'
  2. Click on 'Ctrl+Alt + o '
  3. No thing happens
  4. The uploading process will never finish (I waited for at least 2h)

Expected behavior

It should have given me a "picName"

Screenshots

image

System information

VSCode information

Version: 1.46.0 (user setup)
Commit: a5d1cc28bb5da32ec67e86cc50f84c67cc690321
Date: 2020-06-10T09:03:20.462Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.19041

Additional context

Is this bug picBed specific, i.e. only the picBed you use is affected? Yes/No. Yes Is there any error in the console (Help -> Toggle Developer tools)?: Yes/No. No

If yes, please paste the error here.
pickpikyup commented 4 years ago

补充一下,我在 console里查到的错误信息时:

[PicGo ERROR]: Error: Can't find smms config, please provide api token, see https://sm.ms/home/apitoken

这个应该怎么添加呢?

pickpikyup commented 4 years ago

Solved。。。

setting.json里添加 "picgo.picBed.smms.token": "your token" 就好了

也就是说,smms也需要申请账号了

upupming commented 4 years ago

Solved。。。

setting.json里添加 "picgo.picBed.smms.token": "your token" 就好了

也就是说,smms也需要申请账号了

这个错误是 picgo-core 抛出来的:

https://github.com/PicGo/PicGo-Core/blob/50a4842278a23651068c47b06fded65ce9656d0f/src/plugins/uploader/smms.ts#L28

这里没有展示Error窗口,需要处理一下。