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.0.1 to 0.0.2

3

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

@@ -16,2 +16,3 @@ "description": "Simple express file upload middleware that wraps around connect-busboy",

"express",
"file-upload",
"upload",

@@ -18,0 +19,0 @@ "forms",

@@ -1,2 +0,63 @@

# express-fileupload
Simple express file upload middleware that wraps around connect-busboy
express-fileupload
===========
Simple express file upload middleware that wraps around [connect-busboy](https://github.com/mscdex/connect-busboy).
Install
=======
npm install express-fileupload
Example
=======
### JavaScript
```javascript
var express = require('express');
var fileUpload = require('express-fileupload');
var app = express();
// default options
app.use(fileUpload());
app.post('/upload', function(req, res) {
var sampleFile;
if (!req.files) {
res.send('No files were uploaded.');
return;
}
sampleFile = req.files.sampleFile;
sampleFile.mv('/somewhere/on/your/server', function(err) {
if (err) {
res.status(500).send(err);
}
else {
res.send('File uploaded!');
}
});
});
```
### Form
```html
<html>
<body>
<form ref='uploadForm'
id='uploadForm'
action='http://localhost:8000/upload'
method='post'
encType="multipart/form-data">
<input type="file" name="sampleFile" />
<input type='submit' value='Upload!' />
</form>
</body>
</html>
```
## Thanks & Credit
* [Brian White](https://github.com/mscdex) for his stellar work on the [Busboy Package](https://github.com/mscdex/busboy) and the [connect-busboy Package](https://github.com/mscdex/connect-busboy)
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