Skip to content

Commit

Permalink
Fixing this.data.pipe is not a function - closes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
pajtai authored and Peter Ajtai committed Apr 15, 2016
1 parent e8ee625 commit f1c3e40
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions jslib/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
var busboy, fs;
var busboy, fs, streamifier;

busboy = require('connect-busboy');

fs = require('fs-extra');

streamifier = require('streamifier');

module.exports = function(options) {
options = options || {};
return function(req, res, next) {
Expand Down Expand Up @@ -37,7 +39,7 @@ module.exports = function(options) {
mv: function(path, callback) {
var fstream;
fstream = fs.createWriteStream(path);
this.data.pipe(fstream);
streamifier.createReadStream(buf).pipe(fstream);
fstream.on('error', function(error) {
return callback(error);
});
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"coffee-script": "^1.9.3",
"gulp": "^3.9.0",
"gulp-coffee": "^2.3.1",
"gulp-util": "^3.0.6"
"gulp-util": "^3.0.6",
"streamifier": "^0.1.1"
}
}

0 comments on commit f1c3e40

Please sign in to comment.