Uploading pictures to database or put them in the file system?

Hello, guys

I want your ideas whether uploading pictures to database or uploading
to the file system on the web server is the best way to implement? Can
you give me pros and cons about this issue?

Thanks
Chamnap

File systems are much better designed for holding files than
databases. While databases must keep all that data in the transaction
log and be able to roll back the changes, etc., file systems generally
do not attempt to provide that level of data integrity. As such they
are faster and more efficient at it. Since databases require full
pages for blobs you do not save any space placing files in the
database either. But, if efficiency is not the issue, putting them in
the database means you do not need to worry about orphaned files and
so on.

Michael

files-with-rails/

if you are uploading lots of images, I say neither - use amazon s3 :slight_smile:

-Andrew Kuklewicz
http://beginsinwonder.com