Departure
send_file @file.path, :x_sendfile => true
in apidock .
This allows you to serve files from a rail-authenticated file system, but the actual file will go through your apache / lighttd module and will not bind the rails process.
Office MS, , , , , , .
class MyController < ApplicationController
def get_new_document
unless params[:file_path].nil? or params[:server_uri].nil?
@new_document = Net::Http.get(params[:server_uri], params[:file_path])
@new_document.save
end
end
end