Socket
Socket
Sign inDemoInstall

skipper-disk

Package Overview
Dependencies
19
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    skipper-disk

Receive streaming file uploads on your local filesystem.


Version published
Maintainers
3
Install size
825 kB
Created

Readme

Source

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

Keywords

FAQs

Last updated on 17 Aug 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc