HackRU / lcs

The backend for HackRU's website. Manages the user system.
http://hackru.org
MIT License
6 stars 5 forks source link

Multer - Check if the destination folder exists #1

Closed DonutsInBelly closed 7 years ago

DonutsInBelly commented 7 years ago

We need to check if the folder for dumping resumes exists in the first place. The path for the location is built using path.join(__dirname + '/../resumes/' + config.SemesterID)

We could check that it exists before executing the callback(line 16) in multer.js and create the directories if they don't exist already.

EDIT: change path

DonutsInBelly commented 7 years ago

Update: I've changed the path of the resume dump to: path.join(__dirname + '/../resumes/' + config.SemesterID) Editing the OP to update.