0.1.0 • Published 6 years ago

qhimg-cli v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Command-line Usage

Installation

npm install qhimg-cli -g

Usage

Upload a single image

qhimg dog.png

Upload multiple images (globbing supported)

qhimg "*.jpeg" dog.png
qhimg ~/*.(jpg|png|gif)

Display qhimg-cli version:

qhimg --version

Module Usage

Installation

npm install qhimg-cli

Usage

Requiring the module:

const qhimg = require('qhimg-cli')

Uploading files

qhimg.upload('./test/nodejs.png')
    .then(json => {
        console.log(json)
    })
    .catch(err => {
        console.error(err.message)
    })

success response

{
    "code": "success",
    "data": {
        "ext": "png",
        "mime": "image/png",
        "filename": "nodejs.png",
        "url": "https://ps.ssl.qhmsg.com/t019da962bb7ae33344.png"
    }
}

Author

qhimg-cli © metowolf, Released under the MIT License.

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