Skip to content

Commit

Permalink
feat: support vgy.me
Browse files Browse the repository at this point in the history
Support `vgy.me`
  • Loading branch information
lvboda authored May 6, 2023
2 parents eef2b0d + 4d37c32 commit de66118
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## 1.0.3 (2023-05-06)

### Features

- support `vgy.me`. ([#10](https://github.com/lvboda/vscode-img-fast/issues/10)) ([23db2d1](https://github.com/lvboda/vscode-img-fast/pull/11/commits/23db2d12b2f22f010aa9c2ff3b3e75864c83b8c3)), closes [#10](https://github.com/lvboda/vscode-img-fast/issues/10)

## 1.0.2 (2022-12-01)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ A vscode plugin that can quickly upload clipboard images and get image URL.
- Supports single/multiple file paste upload.
- Supports single/multiple file deletion. (cloud deletion)
- Supports customize upload and delete shortcut keys.
- Supports with `multipart/form-data` formalized transmission interface, such as `smms`.
- Supports with `multipart/form-data` formalized transmission interface, such as `smms/vgy.me`.

## Install

Expand Down
2 changes: 1 addition & 1 deletion README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- 支持单/多文件粘贴上传
- 支持单/多文件删除(云端删除)
- 支持自定义上传、删除快捷键
- 理论上支持一切以 `multipart/form-data` 类型传输的接口,如 `smms` 图床的接口
- 理论上支持一切以 `multipart/form-data` 类型传输的接口,如 `smms/vgy.me` 图床的接口

## 安装

Expand Down
5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-img-fast",
"displayName": "Img Fast",
"description": "A vscode plugin that can quickly upload clipboard images and get image URL.",
"version": "1.0.2",
"version": "1.0.3",
"publisher": "lvboda",
"author": {
"name": "Boda Lü",
Expand Down
3 changes: 3 additions & 0 deletions src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export async function uploadImage(image: Image) {
const form = new formData();
form.append(uploadFormDataKey, fs.createReadStream(image.beforeUploadPath));

// TODO 这里先简单处理 以后要支持更多图床的时候把逻辑提出来
if (uploadUrl?.includes('//vgy.me')) form.append('userkey', authorization);

return await axios.request<string>({
url: uploadUrl,
method: uploadMethod,
Expand Down

0 comments on commit de66118

Please sign in to comment.