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

express-fileupload

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-fileupload - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"name": "express-fileupload",
"version": "0.1.0",
"version": "0.1.1",
"author": "Richard Girges <richardgirges@gmail.com>",

@@ -5,0 +5,0 @@ "description": "Simple express file upload middleware that wraps around Busboy",

# express-fileupload
Simple express middleware for uploading files.
[![npm Package](https://img.shields.io/npm/v/express-fileupload.svg?style=flat-square)](https://www.npmjs.org/package/express-fileupload)
[![npm](https://img.shields.io/npm/v/express-fileupload.svg)](https://www.npmjs.org/package/express-fileupload)
[![Build Status](https://travis-ci.org/richardgirges/express-fileupload.svg?branch=master)](https://travis-ci.org/richardgirges/express-fileupload)

@@ -9,5 +9,5 @@ [![downloads per month](http://img.shields.io/npm/dm/express-fileupload.svg)](https://www.npmjs.org/package/express-fileupload)

# Version 0.1.0 Breaking Changes
# Version 0.1.0 Breaking Changes!
## BREAKING CHANGE: No more urlencoded support
#### &raquo; No more urlencoded support
As of `v0.1.0`, there is NO MORE `application/x-www-form-urlencoded` SUPPORT! Moving forward, express-fileupload is considered a "multipart" solution only.

@@ -17,4 +17,4 @@

## BREAKING CHANGE: Official support for Node v4.x.x +
Use with lower versions of Node at your own risk!
#### &raquo; No more support for < Node.js v4
No more support for versions of Node older than v4. Use with lower versions of Node at your own risk!

@@ -51,5 +51,5 @@ # Install

```javascript
var express = require('express');
var fileUpload = require('express-fileupload');
var app = express();
const express = require('express');
const fileUpload = require('express-fileupload');
const app = express();

@@ -60,20 +60,14 @@ // default options

app.post('/upload', function(req, res) {
var sampleFile;
if (!req.files)
return res.status(400).send('No files were uploaded.');
if (!req.files) {
res.send('No files were uploaded.');
return;
}
// The name of the input field (i.e. "sampleFile") is used to retrieve the uploaded file
sampleFile = req.files.sampleFile;
let sampleFile = req.files.sampleFile;
// Use the mv() method to place the file somewhere on your server
sampleFile.mv('/somewhere/on/your/server/filename.jpg', function(err) {
if (err) {
res.status(500).send(err);
}
else {
res.send('File uploaded!');
}
if (err)
return res.status(500).send(err);
res.send('File uploaded!');
});

@@ -80,0 +74,0 @@ });

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