Skip to content

Releases: mofanx/piclab

v1.0.5 增加json传base64字符串

Choose a tag to compare

@mofanx mofanx released this 10 Dec 07:39

方式一:HTTP 上传接口

1)form-data 上传文件

curl -H "Authorization: Bearer your_api_key1" -F "file=@本地图片路径.jpg" http://localhost:3000/api/upload

2)JSON 传 base64 字符串

curl -H "Authorization: Bearer your_api_key1" \
     -H "Content-Type: application/json" \
     -d '{
           "base64": "data:image/png;base64,iVBORw0...",
           "filename": "demo.png",
           "mimeType": "image/png"
         }' \
     http://localhost:3000/api/upload

字段说明:

  • base64 / fileBase64 / data:三选一,传入 base64 字符串或 data URL,必填
  • filename / name / fileName:可选,默认自动生成
  • mimeType / mimetype / contentType / type:可选,默认从 data URL 或文件内容推断

v1.0.4

Choose a tag to compare

@mofanx mofanx released this 01 Jun 03:02

v1.0.4 发布说明

功能改进

  • 添加健康检查端点和错误处理
  • 调整大小限制为50M
  • 升级文件命名规则,避免文件冲突

这个版本增强了图片上传的可靠性

v1.0.3

Choose a tag to compare

@mofanx mofanx released this 25 Apr 15:10

v1.0.3 发布说明

功能改进

  • 新增 extract_image_url 静态方法,自动识别 或 md 格式并提取图片链接
  • upload_image/get_clipboard_image_or_url 支持自动适配 markdown 图片语法和普通图片链接
  • 优化截图上传脚本输出,避免重复提示

这个版本增强了对 Markdown 图片格式的支持,使得上传和处理图片更加便捷。

v1.0.2

Choose a tag to compare

@mofanx mofanx released this 25 Apr 09:20

从图片上传方法中返回 markdown 链接并改进错误处理,方便其他脚本调用

v1.0.1

Choose a tag to compare

@mofanx mofanx released this 24 Apr 02:42

优化系统通知函数,提升兼容性和健壮性

v1.0.0

Choose a tag to compare

@mofanx mofanx released this 21 Apr 12:46

发布 v1.0.0:\n\n- 支持 API Key 批量生成脚本\n- 支持 .env 环境变量配置,pm2/dotenv 启动兼容\n- 上传工具新增快捷键截图上传功能(F8+P、F8+O)\n- 优化 pm2 启动行为,所有变量统一由 .env 文件和 dotenv 加载\n- 适配多平台截图与上传,提升易用性\n- README 完善所有用法说明\n