My first post here. I’m quite new to Ruby.
I’m making a Flash application that loads external files
from other servers onto the user’s hard disk.
That’s why I need a way to connect to the remote locations
over absolute http links; so I can monitor the progress inside
my Flash app. So this code should act as a file serving proxy.
Flash has some security restrictions, that will not allow the
loading of external files from other domains.
What I’ve got is this (not working, throws an error).
I used this file as an example:
“Cannot read file http://www.twin-diamonds.com/pic/rubies.jpg”
class StreamDataController < ApplicationController
send_file(params[:file],:filename => params[:name],
:stream => ‘true’, :buffer_size => ‘4096’)