Don't break the whole server if an import failed because no files were uploaded

Fixes #1611
This commit is contained in:
Marcel Klehr 2013-03-19 18:40:39 +01:00
parent cb45c44b4d
commit c30697cb07
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ exports.doImport = function(req, res, padId)
form.parse(req, function(err, fields, files) {
//the upload failed, stop at this point
if(err || files.file === undefined) {
console.warn("Uploading Error: " + err.stack);
if(err) console.warn("Uploading Error: " + err.stack);
callback("uploadFailed");
}
//everything ok, continue