Reputation: 22684
I'm working in php and want to make directories for each user where I would store their uploaded images. Only the user can access his/her directory and respective images.
I couldn't find much documentation on how to do this, namely creating directories, best place to put them in my server, how to link them to a user, and setting them to private. Please share your guidance on where to start. What is the standard practice?
Upvotes: 0
Views: 291
Reputation: 14983
You should consider to put Files with restricted access outside the public webroot folder and serve them via PHP, which will enable you to check the users credentials before. (see Fastest Way to Serve a File Using PHP)
That way you might not need one directory per user.
Upvotes: 2