upyun-dispenser

0.1.0 • Public • Published

upyun-dispenser

NPM version

fast create a ablum with the photos in a dir using upyun


Installation

$ npm install upyun-dispenser

Usage

dispenser(files, config, callback)

Arguments

  • files: files path list to upload
  • config: config for upyun
    • bucket: upyun bucket
    • operator: upyun bucket's operator
    • password: password of operator
    • path: store in which dir
  • callback: it will come with two arguments
    • first: err: for catch error
    • second: result: an array contains the urls of the files which uploaded to upyun bucket

Example

var dispenser = require('upyun-dispenser');
 
var config = {
    bucket: 'lisposter',
    operator: 'lisposter',
    password: 'test2014',
    path: 'dispenser'
};
 
var files = [
    './Makefile', 
    './lib/dispenser.js', 
    './LICENSE'
];
 
dispenser(files, config, function(err, result) {
    console.log(result);
});

License

MIT © Leigh Zhu

Readme

Keywords

Package Sidebar

Install

npm i upyun-dispenser

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • lisposter