1

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?

Dan Robert
  • 55
  • 8

1 Answers1

0

Yes, you should change the name if you want to keep the file history.

TCC
  • 67
  • 1
  • 6