Forum: Ruby on Rails attachment_fu and get file from session.

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.
832ed6ace46d61032151f4e1864c057f?d=identicon&s=25 Solid (Guest)
on 2007-07-25 12:55
(Received via mailing list)

I'm using the attachment_fu right now and I don't know how to get the
image from session to the browser, before I'll save it. How to output
uploaded_data to the browser?

(I think there are two ways: 1) saving into the temporary file; 2) or
get it straight from the action; )

Fbd9cb107fe7c941333d6a3488691989?d=identicon&s=25 Ramon Tayag (ramontayag)
on 2007-07-25 18:42
(Received via mailing list)
Hi Solid.  Sorry, could you repeat your question?  Attachment_fu
automatically knows how to read the "uploaded_data" part in the file

On 7/25/07, Solid <> wrote:
> Dmitry
> >

Ramon Tayag
832ed6ace46d61032151f4e1864c057f?d=identicon&s=25 Solid (Guest)
on 2007-07-25 22:51
(Received via mailing list)
Sorry that I were not able to describe my problem a bit better.

I have two controllers questions and answers. When I'm creating a new
question, I need to add some answers to this question. So I'm going to
the answer controller and adding some answers with some images to the
*session*, because I don't want to save answers at this moment (maybe
a question will not be created, and also for the easy save... for
example: @questions.answers = session[:answers] So
I'm adding my answers to the session... and when I'm trying to edit
this temporary answers, I need to show images for every answer.

The question: how can I output images from the temporary (session)

I see only two ways how to do that, but maybe that isn't a best

1) save uploaded_data to a temporary file (the problem, sometimes we
need to cleanup the temporary folder);
2) output from some answer action, for example named "temporary_image"
the uploaded_data to a browser.

Thank you again,

On Jul 25, 7:41 pm, "Ramon Miguel M. Tayag" <>
This topic is locked and can not be replied to.