I'm making a user plateform on my website with php/mysql, and I want to know if is it good to allow users add photos using the mysql blob file, or adding their photos in a folder with their id, and storing every photo's path with a VARCHAR variable into the database. Thanks
Asked
Active
Viewed 285 times
0
-
1second option is better than saving file data in blob – Jul 17 '13 at 22:58
-
1see http://stackoverflow.com/questions/8182315/store-image-files-or-urls-in-mysql-database-which-is-better or http://stackoverflow.com/questions/3748/storing-images-in-db-yea-or-nay or http://stackoverflow.com/questions/2517752/images-in-database-vs-file-system – Sean Jul 17 '13 at 22:59
1 Answers
1
Always do the following:
- rename the image
- store it in a folder of your choosing
- store the location of the image in a varchar column in your mysql table.
simple and effective.

Smith Smithy
- 585
- 6
- 24