From dce63c2e7abf4a6053d6fb895a9ac2b2eef02434 Mon Sep 17 00:00:00 2001 From: Nagesh Rao Date: Mon, 27 Jun 2011 10:17:47 +0530 Subject: [PATCH] Bug fixed: File upload failing if more than 1 restler.post done simultaneously --- lib/multipartform.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/multipartform.js b/lib/multipartform.js index 00fbb5b..b8b775f 100644 --- a/lib/multipartform.js +++ b/lib/multipartform.js @@ -109,7 +109,7 @@ Part.prototype = { fs.open(this.value.path, "r", 0666, function (err, fd) { if (err) throw err; - position = 0; + var position = 0; (function reader () { fs.read(fd, 1024 * 4, position, "binary", function (er, chunk) { @@ -199,4 +199,4 @@ var exportMethods = { Object.keys(exportMethods).forEach(function(exportMethod) { exports[exportMethod] = exportMethods[exportMethod] -}) \ No newline at end of file +})