# Storing a remotely fetched Tempfile

**URL:** <https://www.ruby-forum.com/t/storing-a-remotely-fetched-tempfile/89556>\
**Category:** Rails\
**Created:** [March 21, 2007, 8:34am UTC](https://www.ruby-forum.com/t/storing-a-remotely-fetched-tempfile/89556 "2007-03-21T08:34:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 21, 2007, 8:34am UTC](https://www.ruby-forum.com/t/storing-a-remotely-fetched-tempfile/89556/1 "2007-03-21T08:34:23Z")

</div>

Hi everyone, I’m having a problem with open-uri and the “file column”  
plugin.

I must set a model attribute (which is handled by file column) to a  
remote file - so that filecolumn wil store it locally and, if it’s an  
image, resize it.

Everything should be quite straight since open-uri returns me an  
instance of Tempfile (as does a web form), except that differently  
from a file uploaded from a form, one loaded with open-uri doesn’t  
have the standard attributes “original-filename” etc.

How can I add these on the fly to make the loaded file “file column  
compliant”?

–  
Ashkey \< Jules Piccotti
