This is difficult to explain, so I will try my best and hopefully edit the question if people need more information. I do not provide the exact code, but just an example of a problem.
I am using rails 2.3.8. I am on Unix.
I have a bunch of files in a directory not accessible to Apache. (i.e. /data/files/file.rpk)
I have the following, in my opinion.
link_to "RPK File", :controller => 'mycontroller', :action=> 'myaction', :file => '/data/files/file.rpk'
My controller has the following.
def myaction if FileTest.exists?(params[:file]) render :file => params[:file] end end
When I select the link on the page, I get a download prompt for my desired file, but the file name is "myaction" instead of the file name.
Thoughts on how I can properly name him?
Kirby source share