I am trying to create a website on which I need to save several files uploaded by the user (for example, images of some profiles, some xml files, etc.).
So what is the best way to store these files?
I am currently creating a new directory on the server for each new user that logs in and saves files for each user in the corresponding directory, but someone told me that this is not the best way.
So how can I store these files? I create a shared directory and name the files according to the user ID or something related to the user, or continue to create a new directory for each user.
source share