From 1102ff0ef8e8c1339a88436079782cb6cad8de09 Mon Sep 17 00:00:00 2001 From: hippoz Date: Fri, 2 Oct 2020 23:05:56 +0300 Subject: [PATCH] that function didnt exist. hope this fixes it --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);