This content has been marked as final. Show 4 replies
Originally posted by: manofspirit
Please put some light on this image matter.
should i upload and store it in mysql database directly or application will move the file in a specific folder and will save its path in the database?
First (and quick answer): as you prefer :)
Second (more detailed answer):
php has to set the folder where you want to upload the image and then tell the db the path (like wordpress does).
In this case I strongly suggest to have a look at wordpress code (since it is open source).
If you want to store images directly in the db, you can, but please consider there is a size limit (but I don't remember the
value) for binary objects stored in tables.
Thanks for the reply
My confusion is actually, what is the widely used method for web applications? i think web applications doesnt store images in the database! (e.g. amazon.com's product pictures) am i right?
The most widely used method is to store pictures in folders and let the db collect just the absolute path.
Thanks alot dude, This is what i wanted to know :D