Skip to content

Commit

Permalink
only check existence of the project dir
Browse files Browse the repository at this point in the history
  • Loading branch information
hurngchunlee committed Sep 27, 2022
1 parent 1949b06 commit a476b1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions streamer-ui/packages/server/routes/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ var _validateFile = function(req, res, next) {
return next(createError(500, "Error obtaining project storage directory name"));
}

if (!utils.dirExists(projectStorageDirname)) {
return next(createError(500, "Project storage directory not found"));
}
if (!utils.dirExists(path.join(req.app.locals.STREAMER_UI_PROJECT_DIR, projectNumber))) {
return next(createError(500, "Project storage not found for " + projectNumber));
}

// Obtain file attributes
const filename = req.body.filename;
Expand Down

0 comments on commit a476b1e

Please sign in to comment.