node-uploader

an uploader utility for Node

npm install node-uploader
1 downloads in the last day
3 downloads in the last week
6 downloads in the last month

node-uploader - An uploader utility for Node

Install

npm install node-uploader

Usage

var uploader = require('node-uploader');
/**
 * @param {Object} options 文件上传的设置项
 *     @param {String} options.url 服务器接收地址
 *     @param {Object} options.files 上传的文件哈希
 *     @param {Object} options.data 上传携带的额外表单数据
 * @param {Function} callback 上传过程的回调函数
 */
uploader.upload({
  url: 'http://my-service.com/upload-endpoint',
  files: {
    key1: 'photo.png',
    key2: 'data.txt'
  },
  data: {
    username: 'xiaobai'
  }
}, function(e, response){
  if(!e){
    console.log(response);
  }
});

Licence

ATT is free to use under MIT license.

Bugs & Feedback

Please feel free to report bugs or feature requests. You can send me private message on github, or send me an email to: [colorhook@gmail.com]

npm loves you