Dear all,
I have a question which is driving me crazy
Kindly look the below code
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
<%= link_to image_tag("backup.png",:title => "view chat"),"/Server_exe/#{log.file_path}", :popup => true %>
when clicking on the above link i show the live(the files which are not moved to the archive location)chat files on a browser window these chat files are located in our rails applications public directory.this works just fine.that chat file can contain images with it.and this method properly opens a browser window and shows the chat file with images.in this case i don get any problem since it shows the chat file as it as they are.
But when i move these chat files to the archived location i wil be running into the problem
Archive location is D:/temp
so these files wiil be moved to the above location when archive functionlity is taking place.
Archived folder structure
D:\Temp\ChatHistory\2010-01-10\2010-01-10\1~Vs~2\1~Vs~2.html => this is my archived chat file path
D:\Temp\ChatHistory\2010-01-10\1~Vs~2\ScreenCapture\2120100109101048121.jpg => this image is shown in the chat file
So to view the archived chat file from the archive location i use method like below...
<%= link_to image_tag("backup.png",:title => "view chat"),{:action => "open_file",:file_path => @file_path},{:target => '_new'} %>
def open_live_file