diff --git a/src/node/handler/ImportHandler.js b/src/node/handler/ImportHandler.js index 5b262c26b..45c4c6ea8 100644 --- a/src/node/handler/ImportHandler.js +++ b/src/node/handler/ImportHandler.js @@ -85,13 +85,14 @@ exports.doImport = function(req, res, padId) if(err || files.file === undefined) { if(err) console.warn("Uploading Error: " + err.stack); callback("uploadFailed"); + + return; } + //everything ok, continue - else { - //save the path of the uploaded file - srcFile = files.file.path; - callback(); - } + //save the path of the uploaded file + srcFile = files.file.path; + callback(); }); },