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.


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
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éry
Mongrel-users mailing list

Reply via email to