Luis Lavena wrote:
> On Tue, Sep 14, 2010 at 11:14 AM, Amit Tomar <> 
> wrote:
>> luis ,but do n't have option other than send_data and one thing i can do
>> is while downloading large files i can do it in chunks but i only
>> download 4096 byte ,this is my code
> please read about streaming data without loading all the file contents.
> You will need to either use rack directly or create a mongrel handler
> to serve these files outside rails.
> Rails can only deliver one full request meaning it will load the full
> file before completing.
> --
> Luis Lavena
> AREA 17
> -
> Perfection in design is achieved not when there is nothing more to add,
> but rather when there is nothing more to take away.
> Antoine de Saint-Exupé²¹,"rb") do |f|
      while @buffer =

      ext = File.extname(@containerformat.streamName)

      if ext == ''
        extension = File.extname(@containerformat.location)

        #send_to_web_app(pos, buffer)

        send_data(@buffer,:filename =>,
        :disposition => 'attachment')


      send_data(@buffer,:filename => @containerformat.streamName,
        :disposition => 'attachment')

now am doing it like above and trying to download 284mb of file
but only 211 bytes of file being downloaded..

Posted via
Mongrel-users mailing list

Reply via email to