send_data from remote http adress

M

Mister Twister

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top