diff --git a/index.js b/index.js index 2e9f643..61b78f2 100644 --- a/index.js +++ b/index.js @@ -87,7 +87,7 @@ app.post('/api/upload', (req, res) => { const file = req.files.file; const filepath = `${config.storagePath}/${file.name}`; - path.exists(filepath, (exists) => { + fs.exists(filepath, (exists) => { if (!exists) { file.mv(filepath, (err) => { if (err) return res.status(500).send(err);