Comparing version 0.0.5 to 0.0.6
@@ -100,11 +100,11 @@ // TODO: | ||
if ((nsize += data.length) > fileSizeLimit) { | ||
file.emit('data', data.slice(0, (fileSizeLimit - nsize))); | ||
file.push(data.slice(0, (fileSizeLimit - nsize))); | ||
file.emit('limit'); | ||
part.removeAllListeners('data'); | ||
} else | ||
file.emit('data', data); | ||
file.push(data); | ||
}; | ||
onEnd = function() { | ||
file.emit('end'); | ||
file.push(null); | ||
}; | ||
@@ -111,0 +111,0 @@ } else { |
@@ -102,3 +102,3 @@ var jsencoding = require('../../deps/encoding/encoding'), | ||
if (key.length) { | ||
this.boy.emit('field', convertVal(buffer, this.charset), | ||
this.boy.emit('field', convertVal(key, this.charset), | ||
undefined, | ||
@@ -105,0 +105,0 @@ false, |
{ "name": "busboy", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"author": "Brian White <mscdex@mscdex.net>", | ||
@@ -4,0 +4,0 @@ "description": "A streaming parser for HTML form data for node.js", |
@@ -69,3 +69,3 @@ | ||
// Listening for requests | ||
// File [filefield]: filename: ryan-speaker.jpg | ||
// File [filefield]: filename: ryan-speaker.jpg, encoding: binary | ||
// File [filefield] got 11971 bytes | ||
@@ -135,4 +135,4 @@ // Field [textfield]: value: 'testing! :-)' | ||
var busboy = new Busboy({ headers: req.headers }); | ||
busboy.on('file', function(fieldname, file, filename) { | ||
console.log('File [' + fieldname +']: filename: ' + filename); | ||
busboy.on('file', function(fieldname, file, filename, encoding) { | ||
console.log('File [' + fieldname +']: filename: ' + filename + ', encoding: ' + encoding); | ||
file.on('data', function(data) { | ||
@@ -139,0 +139,0 @@ console.log('File [' + fieldname +'] got ' + data.length + ' bytes'); |
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
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
649246