I know this topic is widely talked about. I’ve done my research, and decided to store image files onto the server instead of the DB as a blob file. The problem that I am having is trying to figure out the best way to upload the file, store it in a designated folder then storing the destination in the db..say../img/something.jpg – I’ve tried looking through many resources but most of them are missing some important steps in the process.
Problems:
- Finding a secure way for uploading the img file
- Limiting the file
- size Uploading the image to a destination file
- Storing the destination file as a text in the DB
I’m using PHP and MySQL.
Here you go, this covers the basic ideas of what you want to do:
This is meant to show how it could be done.