I moved my file storage to Rackspace Cloudfiles and it broke my send_file action.
old
def full_res_download
@asset = Asset.find(params[:id])
@file = "#{Rails.root}/public#{@asset.full_res}"
send_file @file
end
new
def full_res_download
@asset = Asset.find(params[:id])
@file = "http://86e.r54.cf1.rackcdn.com/uploads/fake/filepath.mov"
send_file @file
end
When the files were in the public file. the code worked great. When you click in the link the file would download and the webpage would not change. Now it gives this error.
Cannot read file http://86e.r54.cf1.rackcdn.com/uploads/fake/filepath.mov
What am i missing?
Thank you so much for your time.