interfaces of sm.ms
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);
})();
``