Forum: Ruby on Rails Storing a remotely fetched Tempfile

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ashkey (Guest)
on 2007-03-21 09:34
(Received via mailing list)
Hi everyone, I'm having a problem with open-uri and the "file column"

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

Ashkey < Jules Piccotti
This topic is locked and can not be replied to.