Languages

Express.js - how to give files unique names on upload?

3 points
Asked by:
chelsea
806

I need unique names for files in my application, so the filenames won't double. How can I do that?

2 answers
7 points
Answered by:
Root-ssh
178180

Try to use embedded Node.js crypto module.

e.g.

Source: https://dirask.com/snippets/Node-js-generate-random-UUID-embedded-native-solution-pONAZD

 

0 commentsAdd comment
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join