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 Y. | 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
Rajinder Y. 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 Y. | 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/
On Mon, Dec 6, 2010 at 3:22 AM, Atheeq P. [email protected] wrote:
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.
–
Kind Regards,
Rajinder Y. | 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
Rajinder Y. 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 Laibow-Koser
http://www.marnen.org
[email protected]
On Mon, Dec 6, 2010 at 2:59 PM, Marnen Laibow-Koser
[email protected] wrote:
–
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
Marnen,
you got a valid point, that didn’t cross my mind.
Thanks!
–
Kind Regards,
Rajinder Y. | 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