Send_data from remote http adress

Hello,

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):
“Cannot read file http://www.twin-diamonds.com/pic/rubies.jpg

class StreamDataController < ApplicationController
def index
send_file(params[:file],:filename => params[:name],
:stream => ‘true’, :buffer_size => ‘4096’)
end
end

On 2/21/07, Mister T. [email protected] wrote:

class StreamDataController < ApplicationController
def index
send_file(params[:file],:filename => params[:name],
:stream => ‘true’, :buffer_size => ‘4096’)
end
end

This is the Ruby language mailing list. You may have better luck at the
Ruby on Rails ML: http://groups.google.com/group/rubyonrails-talk

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs