Fast passing data through to the browser (swf)

hi -

I need to pass a user a chunk of swf (flash) data: ie a full-flash page.
without using a redirect, is there a quick way to read a file and send
as a chunk of binary data back to the browser? PHP had some type of
“pass-through” function.

otherwise i guess i have file open, read as a string, and then use …
? to write as a buffered output to the browser?

tx,

/dc

  David "DC" Collier

mailto:[email protected]
+81 (0)80 6521 9559
skype: callto://d3ntaku

Hello David,

On Tue, 31 Oct 2006 12:34:56 +0900, dc [email protected] wrote:

I need to pass a user a chunk of swf (flash) data: ie a full-flash page.
without using a redirect, is there a quick way to read a file and send
as a chunk of binary data back to the browser? PHP had some type of
“pass-through” function.

otherwise i guess i have file open, read as a string, and then use …
? to write as a buffered output to the browser?

There are a few solutions, but it depends upon your environment.
Are you using plain Rails, Ruby CGI, mod_ruby, Apache, Lighttpd?

Here are few links that might help:

http://wiki.rubyonrails.org/rails/pages/HowtoSendFilesFast

http://blog.segment7.net/articles/2006/03/27/image-serving-with-webrick

http://rubyonrails.org/api/classes/ActionController/Streaming.html

Best,
Zev