skipper-disk
Receive Skipper's file uploads on your local filesystem
Last updated 8 years ago by sgress454 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install skipper-disk 
SYNC missed versions from official npm registry.

skipper emblem - face of a ship's captain Disk Blob Adapter

NPM version     Build Status

Local filesystem adapter for receiving upstreams. Particularly useful for streaming multipart file uploads from the Skipper body parser.

Installation

$ npm install skipper-disk --save

This module is part of the default configuration in Sails.

If you're using this module outside of Sails (e.g. Express or a vanilla Node.js server), make sure you have skipper itself installed as your body parser.

Usage

This module is bundled as the default file upload adapter in Skipper, so the following usage is slightly simpler than it is with the other Skipper file upload adapters.

In the route(s) / controller action(s) where you want to accept file uploads, do something like:

req.file('avatar')
.upload({
  // ...options here...
},function whenDone(err, uploadedFiles) {
  if (err) return res.negotiate(err);
  else return res.ok({
    files: uploadedFiles,
    textParams: req.params.all()
  });
});

For more detailed usage information and a full list of available options, see the Skipper repo, especially the section on "[https://github.com/balderdashy/skipper#uploading-files-to-disk](Uploading to Local Disk)".

Contribute

Check out the contribution guide and roadmap.

To run the tests:

$ npm test

License

MIT

Mike McNeil, Balderdash Design Co., Sails Co.

See LICENSE.md.

This module is part of the Sails framework, and is free and open-source under the MIT License.

image_squidhome@2x.png

Current Tags

  • 0.5.12                                ...           latest (6 years ago)

21 Versions

  • 0.5.12                                ...           6 years ago
  • 0.5.11                                ...           7 years ago
  • 0.5.10                                ...           7 years ago
  • 0.5.9                                ...           8 years ago
  • 0.5.8                                ...           8 years ago
  • 0.5.7                                ...           8 years ago
  • 0.5.6                                ...           8 years ago
  • 0.5.4                                ...           10 years ago
  • 0.5.3                                ...           10 years ago
  • 0.5.2                                ...           10 years ago
  • 0.5.0                                ...           10 years ago
  • 0.4.0                                ...           10 years ago
  • 0.3.1                                ...           10 years ago
  • 0.2.6                                ...           11 years ago
  • 0.2.5                                ...           11 years ago
  • 0.2.4                                ...           11 years ago
  • 0.2.3                                ...           11 years ago
  • 0.2.2                                ...           11 years ago
  • 0.2.1                                ...           11 years ago
  • 0.2.0                                ...           11 years ago
  • 0.1.0                                ...           11 years ago
Downloads
Total 3
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (1)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE