diff --git a/dist/index.js b/dist/index.js index 5e0a94f..86777c2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -218,7 +218,7 @@ app.post('/', uploadZip.single('dataset'), async (req, res, next) => { let fileExists; let id; req.setTimeout(0); - if (typeof req.file === 'undefined' && req.file === null) { + if (typeof req.file === 'undefined' || req.file === null) { console.error('No file in upload'); return next('ERROR: Please upload dataset as zip file'); } @@ -269,7 +269,7 @@ app.post('/job/:id', uploadOnnx.single('model'), async (req, res, next) => { let meta = null; let id; req.setTimeout(0); - if (typeof req.file === 'undefined' && req.file === null) { + if (typeof req.file === 'undefined' || req.file === null) { console.error('No file in upload'); return next('ERROR: Please model as ONNX file'); }