# smmsx **Repository Path**: csling/smmsx ## Basic Information - **Project Name**: smmsx - **Description**: 图床服务 sm.ms 的 nodejs 接口 An interface of nodejs to sm.ms - **Primary Language**: NodeJS - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-02-27 - **Last Updated**: 2020-12-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # smmsx 图床服务 sm.ms 的 nodejs 接口 An interface of nodejs to sm.ms ## Document 使用 resize 需系统先安装 GraphicsMagick 或者 ImageMagick, 请参考 http://aheckmann.github.io/gm/ ## Example ```nodejs const smmsx = require('smmsx'); // ES6, ES7 (async()=>{ // resize const source = 'https://tu.66vod.net/2017/8270.jpg'; const dist = '/tmp/image_thumb' + (new Date().gettime()) + Math.random() + '.jpg'; const width = 200, height = null; await smmsx.resize(source, dist, width, height); // upload const result = await smmsx.upload(dist); console.log(result); })(); ```