Which is the best method to save uploaded images?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mukunthan
Forum Newbie
Posts: 12
Joined: Sat Sep 13, 2008 12:52 am

Which is the best method to save uploaded images?

Post by mukunthan »

Hi All,
Which is the best method to save the images uploaded via form input "file" tag.Is it better to store the images in a folder(0777permission) in the server using "move_uploaded_file" and display it from that folder where ever necessary or is it better to store them in the MySQL DB Table BLOB column and display it from there. Kindly tell me pros and cons of each method?

Thanks in Advance
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: Which is the best method to save uploaded images?

Post by jayshields »

A search around would probably tell you but the bottom line is that you should really use the file system for files and the database for data. Mainly due to performance.
Post Reply