M
Mateusz Tybura
[Note: parts of this message were removed to make it a legal post.]
I've got problem with allow user to download file.
This is sending method:
class DownloadController < ApplicationController
def send
@headers["Content-Type"] =
("./public/files/"+params[ath]+"/"+params[:name]).content_type
send_file(("./public/files/"+params[ath]+"/"+params[:name]), :type =>
param[:name].content_type)
end
end
In view i have:
<%= link_to st, :controller => "download", :action => "send", ath => s,
:name => st %>
I get error:
Status: 500 Internal Server Error Content-Type: text/html 500 Internal
Server Error
I've got problem with allow user to download file.
This is sending method:
class DownloadController < ApplicationController
def send
@headers["Content-Type"] =
("./public/files/"+params[ath]+"/"+params[:name]).content_type
send_file(("./public/files/"+params[ath]+"/"+params[:name]), :type =>
param[:name].content_type)
end
end
In view i have:
<%= link_to st, :controller => "download", :action => "send", ath => s,
:name => st %>
I get error:
Status: 500 Internal Server Error Content-Type: text/html 500 Internal
Server Error