Storing a remotely fetched Tempfile


#1

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