imgupload

0.1.15 • Public • Published

imgupload

Autohome Fastdfs picture upload node implementation.

Installation

npm install imgupload

Usage

var imgupload = require('imgupload');
 
imgupload().then();

Options

baseURL:

Type: String

keyURL

Type: String

source

Type: String

minutes

Type: String

uploadURL

Type: String

outFileName

Type: String

imgPath

Type: String

extname

Type: String

Example

var imgupload = require('./imgupload/index');
 
imgupload({
  imgPath: process.cwd() + '/src/images/'
}).then(function(dataList) {
  console.log(dataList);
});

Return data:

[{
    localURL: '/Users/luciy/Desktop/src/images/Rendering.jpg',
    onlineURL: 'g8/M0D/22/0D/wKgHz1Z8o0mAb481AABsDFfNEUg903.jpg'
}, {
    localURL: '/Users/luciy/Desktop/src/images/avsevsr.png',
    onlineURL: 'g8/M0E/18/16/wKjBz1Z8o0mADParAABJPD-j46o497.png'
}, {
    localURL: '/Users/luciy/Desktop/src/images/investigation.jpg',
    onlineURL: 'g16/M04/1F/7C/wKgH5lZ8o0mAdC6UAABT4TRdHt0865.jpg'
}, {
    localURL: '/Users/luciy/Desktop/src/images/math.png',
    onlineURL: 'g16/M03/1F/41/wKjBx1Z8o0mAdXJwAACHFtN-btA938.png'
}, {
    localURL: '/Users/luciy/Desktop/src/images/rem.png',
    onlineURL: 'g16/M0A/1F/4D/wKgH11Z8o0mAYsmZAADgeHHf17U462.png'
}]

Readme

Keywords

Package Sidebar

Install

npm i imgupload

Weekly Downloads

0

Version

0.1.15

License

MIT

Last publish

Collaborators

  • luciy