# Send\_data from remote http adress

**URL:** <https://www.ruby-forum.com/t/send-data-from-remote-http-adress/86348>\
**Category:** Ruby\
**Created:** [February 21, 2007, 5:50pm UTC](https://www.ruby-forum.com/t/send-data-from-remote-http-adress/86348 "2007-02-21T17:50:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![webdevotion](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/48db29/32.png) [@webdevotion](https://www.ruby-forum.com/u/webdevotion)\
**Post date:** [February 21, 2007, 5:50pm UTC](https://www.ruby-forum.com/t/send-data-from-remote-http-adress/86348/1 "2007-02-21T17:50:26Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![webdevotion](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/48db29/32.png) [@webdevotion](https://www.ruby-forum.com/u/webdevotion)\
**Post date:** [February 21, 2007, 6:01pm UTC](https://www.ruby-forum.com/t/send-data-from-remote-http-adress/86348/2 "2007-02-21T18:01:17Z")

</div>

On 2/21/07, Mister T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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](http://groups.google.com/group/rubyonrails-talk)
