Programmatic multipart file uploads
JavaScript
Switch branches/tags
Nothing to show
Permalink
Failed to load latest commit information.
tests
.gitignore
.travis.yml
LICENSE
README.md
index.js
package.json

README.md

build status

File Uploader

Easily perform programmatic multi-part file uploads. Designed for use within test suites.

Usage

var uploader = require('file-uploader')

var file   // set to the path of the file you want to upload
var cookie // set a cookie if you require authorisation

var options = {
  host : 'localhost',
  port : 4000,
  path : '/upload',
  method : 'POST',
  encoding : 'utf8'
}

uploader.postFile(options, file, {Cookie: cookie}, function(err, res) {
  console.log(res.statusCode)
})

See Also

Credit

Originally inspired by Anand Prakash.