Forum: Ruby on Rails Storing a remotely fetched Tempfile

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.
E19511071340d737e973504247e207e8?d=identicon&s=25 Ashkey (Guest)
on 2007-03-21 08:34
(Received via mailing list)
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
This topic is locked and can not be replied to.