People, a little hand here please.
On the website I'm developing, the user can upload some files. Where is preferable to keep them? In a folder I create in the same place where it will be the site, or a folder within the same project? Which way is more secure? How do I get the files are accessible only through the site, only at the pages that they should be displayed and you can not see that folder in the browser? If the folder is created within the project, how to make it not overwrite the old every time I go upload a new version of the site?
One more thing: how do I make sure that a file is actually an extension that it says? For example, how do I know that a file sent by a user is actually a jpg, not an mp3?
...
Go to the complete details ...