upyun-dispenser
v0.1.0
Published
fast upload batch files in a dir to upyun
Downloads
6
Readme
upyun-dispenser
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 uploadconfig
: config for upyunbucket
: upyun bucketoperator
: upyun bucket's operatorpassword
: password of operatorpath
: 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
- first:
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