that function didnt exist. hope this fixes it

This commit is contained in:
hippoz 2020-10-02 23:05:56 +03:00
parent 73491c9387
commit 1102ff0ef8

View file

@ -87,7 +87,7 @@ app.post('/api/upload', (req, res) => {
const file = req.files.file; const file = req.files.file;
const filepath = `${config.storagePath}/${file.name}`; const filepath = `${config.storagePath}/${file.name}`;
path.exists(filepath, (exists) => { fs.exists(filepath, (exists) => {
if (!exists) { if (!exists) {
file.mv(filepath, (err) => { file.mv(filepath, (err) => {
if (err) return res.status(500).send(err); if (err) return res.status(500).send(err);