How to display an image that is stored on a file store outsi

I would like know how do I display images that are stored on a file
store outside the public folder. I will be creating these images
outside the web application but wanted to display the images. What are
the options available for me. I looked at the file_column and the
fleximage plugins. I could not figure it out. Could someone help me
out.
Thanks
sm

On Jul 16, 5:40 pm, Silvy [email protected] wrote:

I would like know how do I display images that are stored on a file
store outside the public folder. I will be creating these images
outside the web application but wanted to display the images. What are
the options available for me. I looked at the file_column and the
fleximage plugins. I could not figure it out. Could someone help me
out.
Thanks
sm

how about:
http://www.bencurtis.com/archives/2006/11/serving-protected-downloads-with-rails/
http://robertrevans.com/article/files-outside-public-directory

i would like to know whethere u r storing u r image in database with
binary format or not,if u r storing the image in binary format.to
display them in u r application u have to write in controller, to
convert the stored binary format to original image

Thanks for the replies. I wanted to store the actual images in the
file store outside the public folder. But have references to these
images in the database. I will be pre-rendering these images in
different formats. Basically I wanted to traverse an hierarchical tree
menu and at the end of the leaf when further branches are not there, I
wanted to display these images as thumbnails. When clicked on the
thumbnail, I would like to show the actual image. Also wanted to
implements the REST style routing.

controller

def index
menu= Menu.find(params[:menu_id])
@catalogues = Catalogue.find(:all, :conditions =>
“parent_id=‘#{menu.id}’”)
if @catalogues == []
@contents= Catalogue.find_content_for_the_catalogue(menu.id)
end
respond_to do |format|
format.html # index.rhtml
format.xml { render :xml => @catalogues.to_xml }
end
end

View


<% if @catalogues != [] %>
<% for catalogue in @catalogues %>

<%= link_to catalogue.name, catalogues_path(catalogue) %>

<% end %>
<% else %>

<% @contents.contents.each do |content| %>

<%= link_to(image_tag(“images/50x50/#{content.name
+”_50X50"}.png", :border => 1), {:controller => ‘contents’, :action
=>“show”, :id=>content.id})%>

<% end %>

<% end %>

I would like to display these images from the file store.
Thanks
Silvy

On Jul 16, 11:14 pm, seeram_theprince [email protected]