2010/1/12 Newb Newb
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>:> Dear all,
>
> kindly look at the below code
>
> <%= link_to image_tag("backup_configure.png",:title =>
"view
> chat"),{:action => "open_live_file",:file_path =>
@file_path},{:target
> => ''_new''} %>
>
> def open_live_file
> #--------------
> @backup = ChathistoryBackup.find(:first)
>
> unless @backup.nil? and params[:file_path].nil?
>
> file_path = params[:file_path]
>
> if File.exists?("#{file_path}")
>
> render :file => "#{file_path}", :layout => false
>
> end
>
> end
>
> end
>
>
> when clicking on the above link it opens the html file on a browser
> window but it has not shown the images in the html file.
If you view the source in your browser what is shown for the image?
Assuming it looks ok what happens if you copy the img src string and
enter that directly in the browser.
If the html seems ok try copying the complete source of the page and
pasting it into the html validator at
http://validator.w3.org/#validate_by_input to check the html is valid.
Colin
>
> In my public folder
>
> public/Server_exe/ChatHistory/2010-01-10/2010-01-10\1~Vs~2\1~Vs~2.html
> => this is my live chat file path
>
> for the above chat file images are in the following path
>
>
public/Server_exe/ChatHistory/2010-01-10/1~Vs~2/ScreenCapture/2120100109101048121.jpg
> => this image is shown in the chat file
>
> when rendering this file why the images are not shown even its all in
> public folder
>
> i m running in to this issue for a past 2 days.
>
> Kindly provide Ur advices on this issue
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
> To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.