New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

express-plupload

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-plupload

Middleware for Express to accept 'chunked' uploads from PLUpload

  • 0.2.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

express-plupload

Middleware for Express to accept 'chunked' uploads from PLUpload (http://www.plupload.com), output as a single readStream.

Note: this will only work where incoming requests for different PLUpload chunks will always hit the same server. State of an upload is stored in memory.

To install

npm install express-plupload*

How to use

From examples/app.js:

app.use('/upload', require('express-plupload').middleware);
app.use('/upload', function(req, res, next){
  // If the upload already has a writeStream
  if (!req.plupload.isNew) {
    req.once('end', function(){ res.send(201); });
    return;
  }

  // Create a new, single writeStream for the new/resuming upload
  var writePath = path.join('/tmp', req.plupload.filename);
  var writeStream = fs.createWriteStream(writePath, {
    start: req.plupload.completedOffset
  });

  req.plupload.stream.pipe(writeStream);
  req.once('end', function(){ res.send(201); });
});

Keywords

FAQs

Package last updated on 10 Nov 2014

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