RE: Showing Images from a file store

Hi John,
Thanks for the quick response.
I wanted to show the image along with other data from the controller.
How do I do that. Looks like I am not understanding it.

<%= column1 from the model%> <%= column1 from the model%> <%= column1 from the model%> <%= send_file '\\xx.xx.xxx.xx\xx\xx\xxx\abc.gif"', :type => 'image/jpeg', :disposition => 'inline'%>

Would not work. Sorry for my ignorance.

Thanks
Silvy Mathews

On 4/12/06, [email protected] [email protected] wrote:

I wanted to show the image along with other data from the controller.
How do I do that. Looks like I am not understanding it.

<%= send_file '\\xx.xx.xxx.xx\xx\xx\xxx\abc.gif"', :type => 'image/jpeg', :disposition => 'inline'%>

Silvy,

What you want to do is set up a controller that handles the dispatching
of
the images. It is there that you would have the send_file command.
Remember that in HTTP you are going to have seperate request for each
item
on the page, so map the new controller url using routes and use that url
in
your view, for example “/dynamicimages/abc.gif”.

Does that make sense?

Josh

Yea sorry my response was a little short - that function would go in the
controller, i.e.

class FileGrabberController < ApplicationController
def grab_file
send_file ‘/path’, :type => ‘image/jpeg’, [etc]
end
end

then either call the controller directly using an image tag or use a
helper…
let me know if that helps - I can post a working example when I get home
tonight [on the laptop at home]…

Quoting [email protected]: