0.1.0 • Published 9 years ago

upyun-dispenser v0.1.0

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

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