npm install upimg
or
yarn add upimg
const upimg = require('upimg')
take alibaba
for example
upimg.alibaba.upload('./test/nodejs.png')
.then(json => {
console.log(json)
})
.catch(err => {
console.error(err.message)
})
success response
{
"url": "https://ae01.alicdn.com/kf/HTB1dYeZXZrrK1RjSspa763REXXaP.png",
"type": {
"ext": "png",
"mime": "image/png"
}
}
upimg © metowolf, Released under the MIT License.
Blog @meto · GitHub @metowolf · Twitter @metowolf · Telegram Channel @metooooo