This is my code:
if (req.files && req.files.logo) {
const logo = req.files.logo
logo.mv('./static/' + logo.name)
fields['logo'] = logo.name
}
so if the file with the same name is uploaded then does the above logo.mv
function call will override the previously uploaded file?
Yes, you should change the name if you want to keep the file history.