Forum: Ruby on Rails Re: Uploading files and writing them to server?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A43dfa24838887d5ea9ac1f2820317c4?d=identicon&s=25 Sean Cribbs (Guest)
on 2006-03-29 21:13
(Received via mailing list)
On the contrary, I homebrewed file upload because I had issues with
file_column.  I probably wrote about 15 lines of code, most of them in
the model.  I'm willing to share, if anyone wants the code.

Sean Cribbs
Web Services - KCKCC

>>> hatlessnyc@yahoo.com 3/29/2006 12:00 PM >>>

Google for the file_column plugin. It handles many of the minutae like
figuring out where in the filesystem to store the files, handling the
form field gracefully when it comes to updating the database record that
references it, etc., all through a one-line declaration in the model and
a string (varchar) field for the filename. And if they're image files,
it's got hooks into RMagick, ImageMagick, etc. for creating and caching
resized and otherwise processed versions of the image.

Not perfect but applicable to most situations and a whole lot easier
than reinventing the wheel.
B26c571d17b3022ab1a98c1a223c32e6?d=identicon&s=25 David Thomson (Guest)
on 2006-03-29 21:53
(Received via mailing list)
I'd be interested to see it, but why not post the code to Snippets[1]?

David

[1]http://www.bigbold.com/snippets/
D4b246038154d7cc2363256bd25a4fe0?d=identicon&s=25 Larry White (Guest)
on 2006-03-29 21:59
(Received via mailing list)
if you wouldn't mind that would be great
This topic is locked and can not be replied to.