# Re: Uploading files and writing them to server?

**URL:** <https://www.ruby-forum.com/t/re-uploading-files-and-writing-them-to-server/90208>\
**Category:** Rails\
**Created:** [March 29, 2006, 9:13pm UTC](https://www.ruby-forum.com/t/re-uploading-files-and-writing-them-to-server/90208 "2006-03-29T21:13:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [March 29, 2006, 9:13pm UTC](https://www.ruby-forum.com/t/re-uploading-files-and-writing-them-to-server/90208/1 "2006-03-29T21:13:23Z")

</div>

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 C.  
Web Services - KCKCC

> > > removed\_email\_address@domain.invalid 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.

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [March 29, 2006, 9:53pm UTC](https://www.ruby-forum.com/t/re-uploading-files-and-writing-them-to-server/90208/2 "2006-03-29T21:53:09Z")

</div>

I’d be interested to see it, but why not post the code to Snippets[1]?

David

[1][BigBold - Informasi Tentang Bisnis dan Marketing](http://www.bigbold.com/snippets/)

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [March 29, 2006, 9:59pm UTC](https://www.ruby-forum.com/t/re-uploading-files-and-writing-them-to-server/90208/3 "2006-03-29T21:59:16Z")

</div>

if you wouldn’t mind that would be great
