Question

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

Was it helpful?

Solution

Always do the following:

  1. rename the image
  2. store it in a folder of your choosing
  3. store the location of the image in a varchar column in your mysql table.

simple and effective.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top