Save images

Hi All,

I want to give each of my user some 20k of space to load their images or
pic. for their avatar.

These images will not be sent over the internet.

So is it good to store it in db (I am using mysql) or just in images
directory. Uploading is not a problem as it will be done as a one time
job
directly to the server.

I will have plenty of users.

With the limited knowledge of rails and web I have, I find storing it as
a
file in images directory and storing the name of the file in DB very
easy to
achieve. Please help me with the pros and cons of this approach.

Thanks & Warm Regards,

Given the size of files I would store them on the server or on another
server like Amazon S3 storage.

B.

Your instincts on this one are generally correct. There are some use
cases
where storing images in the DB would be useful (e.g. access restriction,
manipulation at the time of the request), but for 98% of all
applications,
storing images in public/images will reduce the load on the database and
your application server.

On Tue, Feb 22, 2011 at 2:13 PM, Bhasker H. <

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs