I see a couple of problems, the most obvious one is the length of the file name. Any uploaded file that you plan on keeping should always be renamed by the app and shouldnt be too long, its good practice. Always rename user uploaded files. This error can be thrown by unlink() & $t...
('Saved report with ID ' + report.id); deferred.resolve(report.id); fs.unlink('tmp/' + filename + '.csv'); fs.unlink('tmp/' + filename + 'temp.json'); }, function(error) { deferred.reject(error); console.log(error); }); } else { deferred.reject({ message: 'CSV file ...