submit

2.0.0 • Public • Published

submit

form upload and progress api

Build Status Dependency Status NPM version

Installation

npm install submit

Usage: submit(form).to(path)

Submit the form form to the path path.

The result is a Promises/A+ promise with the addition of a small subset of the event emitter API that only supports progress events which can be handled by calling .on('progress', (e) => ...)

var submit = require('submit');
submit(form).to('/upload')
  .on('progress', function (e) {
    console.log(e.percent + '%');
  })
  .then(function (res) {
    console.log('complete')
  }, function (err) {
    console.log('error')
  })
  .done();
}

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    3
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i submit

Weekly Downloads

3

Version

2.0.0

License

MIT

Last publish

Collaborators

  • forbeslindesay