From 4b244f43e0d31563b7b6c1772673ef20cfa6fdb3 Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Sat, 19 Jul 2014 06:58:48 +0300 Subject: [PATCH] Fixed issue where uploaded file not immediatly accessible because upload API responds before the upload has completed. --- lib/nbi.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nbi.coffee b/lib/nbi.coffee index 3b897aa..40facfa 100644 --- a/lib/nbi.coffee +++ b/lib/nbi.coffee @@ -306,9 +306,9 @@ else throw err if err gs.close((err) -> throw err if err + response.writeHead(201) + response.end() ) - response.writeHead(201) - response.end() ) ) else if request.method == 'DELETE'