saving attachment and images to database

How can I upload an attachment and store it into a database as a binary blob object?

Also if I (file) upload an image and I resize and create thumbnails, how do I save these images into a database.

Rajinder Yadav wrote in post #966402:

How can I upload an attachment and store it into a database as a binary
blob object?

Also if I (file) upload an image and I resize and create thumbnails, how
do I save these images into a database.

--
Kind Regards,
Rajinder Yadav | DevMentor.org | Do Good! ~ Share Freely

GNU/Linux: 2.6.35-22-generic
Kubuntu x86_64 10.10 | KDE 4.5.1
Ruby 1.9.2p0 | Rails 3.0.1

Hello Rajinder,

We have a plugin in rails which does exactly this job, it creates
thumbnails too. I have implemented this in my two projects. Please
follow this steps

http://jimneath.org/2008/04/17/paperclip-attaching-files-in-rails/

Hi Atheeq,

I fiddled with paperclip in the past, but from what I can see the
image uploaded are being save to file, not the database.

Rajinder Yadav wrote in post #966402:

How can I upload an attachment and store it into a database as a binary
blob object?

[...]

Don't. Keep binary data in the filesystem. That way you won't have to
invoke Rails every time you want to serve a file, and your database will
be easier to maintain.

Best,

Marnen,

you got a valid point, that didn't cross my mind.
Thanks!