I want my files to be secure in my web server. Only authenticated users to access those files should be able to access those files. I thought of storing files in database as
Storing files in DB is very bad practice. Very good practice to store only information about file. Name, extension. Files save on server like $id.$ext. It will be a good architecture. And when user download file, he take file with name in DB. Sorry for my english.