Your link would render a link on the local user’s computer to
“file:///C:/Videos/file.swf” - basically, it would link to that file on
the user’s computer, not the file on the server.
You will have to either place the file within the Web application (under
public or assets), or build a controller method to stream what looks
like
a file in the Web application from the file stored locally. Something
like
this:
def download_file
bytes = # load file into variable
send_data(bytes, :filename => “file.swf”, :type => “application/
x-shockwave-flash”)
end
That may or may not be the best way though, depending on the size of
your
file, because the file will be loaded into memory. Some sort of
streaming
might be necessary - read up on that.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.