enhancementhelp wantedplanned
Description
🥰 需求描述
上传的图片可以通过插件上传到图床
🧐 解决方案
同上
📝 补充信息
插件
这个图床上传接口通过cf代理,访问速度不太理想,所以想通过搭建的nextchat机子中转
{
"openapi": "3.1.0",
"info": {
"title": "Image Upload API",
"description": "A simple API to upload images and convert them.",
"version": "v1.0.0"
},
"servers": [
{
"url": "https://img.kksk.io"
}
],
"paths": {
"/image/post": {
"post": {
"operationId": "uploadImage",
"description": "Uploads an image, converts it to webp format, and checks compliance.",
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"file": {
"type": "string",
"format": "binary",
"description": "The image file to upload."
}
},
"required": ["file"]
}
}
}
},
"responses": {
"200": {
"description": "Image uploaded successfully or non-compliant.",
"content": {
"application/json": {
"schema": {
type: "object",
properties: {
status: { type: "integer" },
msg: { type: "string" },
data: {
type: "object",
properties: {
curl: { type: "string", description: "Converted image URL" },
purl: { type: "string", description: "Original image URL" }
}
}
}
}
}
}
},
"400": {
"description": "Bad request, no files uploaded or invalid file type.",
"content": {
"application/json": {
"schema": {
type: "object",
properties: {
status: { type: "integer" },
msg: { type: "string" }
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
type: "object",
properties: {
status: { type: "integer" },
msg: { type: "string" }
}
}
}
}
}
}
}
}
},
"components": {
"schemas": {}
}
}