Skip to content

timoxley/file-uploader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Programmatic multipart file uploads

Resources

License

Stars

Watchers

Forks

Packages

No packages published