maishu-image-service
TypeScript icon, indicating that this package has built-in type declarations

1.12.0 • Public • Published

CLI

设置

maishu-image-server config

创建数据库

maishu-image-service db

启动

maishu-image-service start

接口

  1. 上传图片

    /upload

    参数

    {
        image: string,  // 要上传图片的 base64 字符串
        width: number,  // 图片宽度
        height: number, // 图片高度
    }

    返回值

    { id: string }
  2. 获取图片

    /image

    参数

    {
        id: string,     // 要获取图片的编号
        width?: number, // 图片的宽度
        height?: number, // 图片的宽度
    }
    • 如果指定 widht 和 heigt,则图片缩放为指定的宽度和高度

    • 如果指定 width,则图片缩放为指定的宽度,高度按比例调整

    • 如果指定 height,则图片缩放为指定的高度,宽度按比例调整

Readme

Keywords

none

Package Sidebar

Install

npm i maishu-image-service

Weekly Downloads

0

Version

1.12.0

License

MIT

Unpacked Size

58.6 kB

Total Files

20

Last publish

Collaborators

  • ansiboy