Giter VIP home page Giter VIP logo

skipper-disk's Introduction

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

If you're using this module with Express, Connect, Kraken, or a vanilla Node.js server, make sure you have skipper itself installed as your body parser. This is the default configuration in Sails as of v0.10.

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

See ROADMAP.md.

Also be sure to check out ROADMAP.md in the Skipper repo.

To run the tests:

$ npm test

License

MIT © 2013, 2014-

Mike McNeil, Balderdash & contributors

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

githalytics.com alpha

skipper-disk's People

Contributors

mikermcneil avatar dzcpy avatar sgress454 avatar

Watchers

Michael Diolosa avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.