Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

connect-multipart-gridform

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-multipart-gridform

MongoDB GridFS backed multipart middleware

  • 0.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

#connect-multipart-gridform

Connect compatible multipart middleware configured to stream uploads directly to MongoDB GridFS.

install

npm install connect-multipart-gridform

use

var multipart = require('connect-multipart-gridform');
app.use(multipart(options));

options

Options work the same way as in the connect multipart middleware, with these additions:

  • db: (required) an open node-mongodb-native db instance
  • mongo: (required) the node-mongodb-native driver you created the db with
  • filename: (optional) function

The optional filename function is passed the file.name before streaming to MongoDB providing an opportunity to customize the filename with a prefix etc.

For the curious, the options are first passed into a gridform before passing on to connects multiple middleware.

why?

Connect multipart middleware uses formidable to process file uploads. formidable streams the files to disk. Now you can stream directly into GridFS.

dependencies

connect-multipart-gridform utilizes both the gridform and connect multipart modules which are directly exposed as:

var multipart = require('connect-multipart-gridform');
var gridform = multipart.gridform;
var connectMultipart = multipart.multipart;

tests

Run the tests with make test.

version

Currently only works with Express 3.

LICENSE

FAQs

Package last updated on 18 Sep 2012

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc