Luis Lavena wrote: > On Tue, Sep 14, 2010 at 2:49 AM, Amit Tomar <li...@ruby-forum.com> > wrote: >> >> Luis ,this is how am downloading my files >> >> send_data(@data,:filename => @containerformat.name+extension, >> ? ? ? ?:disposition => 'attachment') >> but i am getting error failed to allocate memory for large files ,for >> small files it's working fine >> > > Because send_data will try to load the whole file in memory. > > http://apidock.com/rails/ActionController/Streaming/send_data > > Since the file is not dynamically generated, serve it directly, don't > put it behind Rails. > >> and one thing more i observed while uploading large files , whenever i >> upload data more than 2gb from IE OR from mozila ,both restarts but for >> google chorme its working fine??? > > Neither IE or Mozilla do chunked uploads. Chrome does and mongrels > properly streams the chunked upload to a temporary file. > -- > 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é²¹
thanks luis but could you please explain how i serve it directly and for my application i can'nt use IE because as you said it don't do chunked upload. thanks again -- Posted via http://www.ruby-forum.com/. _______________________________________________ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users