Skip to content

guonning/UpImg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Author Version License

Usage

Installation

npm install upimg

or

yarn add upimg

Require module

const upimg = require('upimg')

Support servers

server url
alibaba https://ae01.alicdn.com/kf/HTB1dYeZXZrrK1RjSspa763REXXaP.png
jd https://img14.360buyimg.com/img/jfs/t27652/56/2185046614/6538/3a9cae42/5bfa42ccN6f124f96.png
qihoo https://ps.ssl.qhmsg.com/t019da962bb7ae33344.png
smms https://i.loli.net/2018/11/25/5bfa42f923fe8.png
sogou https://img04.sogoucdn.com/app/a/100520146/601628d09da962bb7ae33344d1529303

Upload file

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"
    }
}

Author

upimg © metowolf, Released under the MIT License.

Blog @meto · GitHub @metowolf · Twitter @metowolf · Telegram Channel @metooooo

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published