Socket
Socket
Sign inDemoInstall

busboy

Package Overview
Dependencies
14
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.6 to 0.0.7

2

lib/types/multipart.js

@@ -96,3 +96,3 @@ // TODO:

var file = new FileStream();
boy.emit('file', fieldname, file, filename, encoding);
boy.emit('file', fieldname, file, filename, encoding, contype);

@@ -99,0 +99,0 @@ onData = function(data) {

{ "name": "busboy",
"version": "0.0.6",
"version": "0.0.7",
"author": "Brian White <mscdex@mscdex.net>",

@@ -4,0 +4,0 @@ "description": "A streaming parser for HTML form data for node.js",

@@ -84,5 +84,5 @@

console.log('Start parsing form ...');
busboy.on('file', function(fieldname, file, filename, encoding) {
busboy.on('file', function(fieldname, file, filename, encoding, mimetype) {
++infiles;
onFile(fieldname, file, filename, encoding, function() {
onFile(fieldname, file, filename, function() {
++outfiles;

@@ -109,3 +109,3 @@ if (done)

function onFile(fieldname, file, filename, encoding, next) {
function onFile(fieldname, file, filename, next) {
// or save at some other location

@@ -136,4 +136,4 @@ var fstream = fs.createWriteStream(path.join(os.tmpDir(), path.basename(filename)));

var busboy = new Busboy({ headers: req.headers });
busboy.on('file', function(fieldname, file, filename, encoding) {
console.log('File [' + fieldname +']: filename: ' + filename + ', encoding: ' + encoding);
busboy.on('file', function(fieldname, file, filename, encoding, mimetype) {
console.log('File [' + fieldname +']: filename: ' + filename);
file.on('data', function(data) {

@@ -193,3 +193,3 @@ console.log('File [' + fieldname +'] got ' + data.length + ' bytes');

* **file**(< _string_ >fieldname, < _ReadableStream_ >stream, < _string_ >filename, < _string_ >transferEncoding) - Emitted for each new file form field found. `transferEncoding` contains the 'Content-Transfer-Encoding' value for the file stream.
* **file**(< _string_ >fieldname, < _ReadableStream_ >stream, < _string_ >filename, < _string_ >transferEncoding, < _string_ >mimeType) - Emitted for each new file form field found. `transferEncoding` contains the 'Content-Transfer-Encoding' value for the file stream. `mimeType` contains the 'Content-Type' value for the file stream.

@@ -196,0 +196,0 @@ * **field**(< _string_ >fieldname, < _string_ >value, < _boolean_ >valueTruncated, < _boolean_ >fieldnameTruncated) - Emitted for each new non-file field found.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc