
Security News
Feross on Risky Business Weekly Podcast: npm’s Ongoing Supply Chain Attacks
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
argo-multiparty
Advanced tools
##Multiparty Parsing for Argo
Simple middleware harnessing multiparty for parsing. The parsed multiparty result is thrown into env.multiparty
.
Sample:
curl -i -X POST -H "Content-Type:multipart/form-data" -F name=test -F test=hello -F filedata=@test.txt http://localhost:3000/
//Get a file upload. Write it's original filename +'0' to the main directory of this app.
var argo = require('argo');
var argoMultiparty = require('../');
var fs = require('fs');
argo()
.use(argoMultiparty)
.use(function(handle) {
handle('request', function(env, next) {
//filedata is the data parameter of the upload.
//Everything if after a successful parse is placed into env.multiparty for access down the pipeline.
var file = env.multiparty.files.filedata[0];
var rs = fs.createReadStream(file.path);
var ws = fs.createWriteStream(file.originalFilename + '0');
rs.pipe(ws);
env.response.statusCode = 201;
next(env)
});
})
.listen(3000);
FAQs
Multiparty parsing middleware for argo.
We found that argo-multiparty demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.