express-fileupload
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"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) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 18 instances in 1 package
63
2
1
5812
7
45