Download problem!


#1

friends,

am using send_file function

controller

def download
@event = Event.find(:first, :conditions => [‘id = ?’,params[:id]])
#@path=@event.file
@path=params[:file_path]
send_file("#{@path}",:type => ‘all’)
end

view file

<% temp_path=@event.file %>
Download

I got this error…

Cannot read file event11991.gif

Thanks.


#2

works fine


#3

You do not have read permissions on that file, or the file does not
exist.

Ryan B.
Freelancer
http://frozenplague.net