Skip to content

command uploadImageFromXXX not found on Ubuntu20.04 via VsCode 1.58.2 #91

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

Closed
seven-steven opened this issue Jul 25, 2021 · 12 comments
Closed

Comments

@seven-steven
Copy link

Describe the bug

I installed the plugin vs-picgo on VsCode 1.58.2, but can't upload images.
The error message shows "command uploadImageFromXXX not found".

To Reproduce

  1. Go to markdown file;
  2. Click on ctrl + alt + U or ctrl + alt + E or ctrl + alt + O;
  3. See error: "command uploadImageFromXXX not found".

Screenshots

image

  • OS: Ubuntu
  • Version 20.04

VSCode information

  • Help -> About -> Copy

      版本: 1.58.2
      提交: c3f126316369cd610563c75b1b1725e0679adfb3
      日期: 2021-07-14T22:30:16.440Z
      Electron: 12.0.13
      Chrome: 89.0.4389.128
      Node.js: 14.16.0
      V8: 8.9.255.25-electron.0
      OS: Linux x64 5.8.0-59-generic
  • vs-picgo version
    2.1.0

  • Settings begin with picgo:

      "picgo.configPath": "/home/seven/.picgo/config.json",

Additional context

Is this bug picBed specific, i.e. only the picBed you use is affected? No.

Is there any error in the console (Help -> Toggle Developer tools)?: No.

@upupming
Copy link
Member

@seven-steven 控制台没有任何报错吗?

@seven-steven
Copy link
Author

@upupming 感谢回应。
我先打开控制台,清空与 picgo 插件无关的警告信息,然后在 markdown 文件中依按下快捷键 ctrl + alt + U or ctrl + alt + E or ctrl + alt + O,屏幕右下角会弹出错误提示,但是控制台没有任何新增报错。

补充:

  1. 我电脑先前安装过命令行版本的 picgo-core,并且将其配置到 Typora 中,可以正常使用且体验良好,不知道 vscode 插件和命令行版本的 picgo-core 是否会有冲突;
  2. 我公司还有一台 Ubuntu 19.10 系统的电脑,明天上班我再安装一下 vs-picgo 试试看行不行。

@upupming
Copy link
Member

@seven-steven 刚刚发了一个包 2.1.1,可以先尝试更新一下

  1. 全局的 picgo-core 和 vs-picgo 自带的不会有任何冲突,这个不必担心
  2. 我看你的控制台完全空白,没有任何信息这不是很正常,正常来说各种插件啥的总会打印一点东西的

@seven-steven
Copy link
Author

@upupming 更新到 2.1.1 之后控制台会显示报错信息,如下:
image

@upupming
Copy link
Member

upupming commented Jul 25, 2021

@seven-steven 看到错误了,打包出了点问题 (PicGo/PicGo-Core#71 ),明天再发个包修复一下

@seven-steven
Copy link
Author

@upupming 好的,麻烦您了

@upupming
Copy link
Member

@seven-steven 已经放在 GitHub Release 了:https://github.com/PicGo/vs-picgo/releases/tag/v2.1.2 ,明早我再请 @Spades-S 更新一下 VSCode Marketplace

@seven-steven
Copy link
Author

seven-steven commented Jul 25, 2021

@upupming 感谢深夜帮我排查和解决问题。

验证

我更新了 vs-picgo 2.1.2 版本,在完全使用默认配置的情况下,sm.ms 图床可以正常使用。
image

但我这边有一些额外的需求。

背景

在我单独安装的 picgo-core 中,我通过 “picgo-plugin-web-uploader" 插件配置了自定义图床(不在默认提供的图床列表之内)。我的 .picgo/config.json 文件如下:

{
  "picBed": {
    "current": "web-uploader",
    "web-uploader": {
      "customBody": null,
      "customHeader": null,
      "url": "XXXXXXXXXXXXXXXXXXXXXXX",
      "paramName": "file",
      "jsonPath": "data.o_url"
    }
  },
  "picgoPlugins": {
    "picgo-plugin-web-uploader": true
  }
}

上述配置在命令行和 Typora 中都是验证正常可用的。

问题

如果我在 vs-picgo 的配置中指定 picgo 的配置文件为 /home/seven/.picgo/config.josn, 也就是上面提到的自定义配置:
image
控制台会提示 ”Can't find smms config", 导致无法上传图片。

image

诉求

请问 vs-picgo 插件能否支持自定义图床呢?无需在 vs-code 中配置自定义图床,只需要能够使用我的 picgo-core 的配置文件即可。

再次感谢!

@Spades-S
Copy link
Member

@seven-steven 已经放在 GitHub Release 了:https://github.com/PicGo/vs-picgo/releases/tag/v2.1.2 ,明早我再请 @Spades-S 更新一下 VSCode Marketplace

done

@Spades-S
Copy link
Member

@upupming 感谢深夜帮我排查和解决问题。

验证

我更新了 vs-picgo 2.1.2 版本,在完全使用默认配置的情况下,sm.ms 图床可以正常使用。
image

但我这边有一些额外的需求。

背景

在我单独安装的 picgo-core 中,我通过 “picgo-plugin-web-uploader" 插件配置了自定义图床(不在默认提供的图床列表之内)。我的 .picgo/config.json 文件如下:

{
  "picBed": {
    "current": "web-uploader",
    "web-uploader": {
      "customBody": null,
      "customHeader": null,
      "url": "XXXXXXXXXXXXXXXXXXXXXXX",
      "paramName": "file",
      "jsonPath": "data.o_url"
    }
  },
  "picgoPlugins": {
    "picgo-plugin-web-uploader": true
  }
}

上述配置在命令行和 Typora 中都是验证正常可用的。

问题

如果我在 vs-picgo 的配置中指定 picgo 的配置文件为 /home/seven/.picgo/config.josn, 也就是上面提到的自定义配置:
image
控制台会提示 ”Can't find smms config", 导致无法上传图片。

image

诉求

请问 vs-picgo 插件能否支持自定义图床呢?无需在 vs-code 中配置自定义图床,只需要能够使用我的 picgo-core 的配置文件即可。

再次感谢!

这个诉求的核心是在于 vs-picgopicgo-core 共用配置文件 🤔,我们先看下如果可行,会在后续版本支持哈

@seven-steven
Copy link
Author

@Spades-S 或者说在不共用配置文件的情况下,我可以自己往 vs-picgo 安装并配置插件实现自定义图床吗?

@upupming
Copy link
Member

@seven-steven 参考 #43 ,后续肯定会实现,不过暂时时间关系还没写😂,先把这个关了哈

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

No branches or pull requests

3 participants