I remember reading (a while back) that rails handles small and large
files different...
On a quick search I found this....
http://blog.vixiom.com/2006/07/26/rails-stringio-file-upload/
but there is better info... hope this points you in the right
direction
On Oct 12, 8:56 am, Bruno Reis
<bruno.p.r...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi all,
>
> when I try to upload a file with 200kb or less, rails does it fine.
> But when I try a bigger one, I get the following error:
>
> ActiveRecord::StatementInvalid in ConteudoController#enviar_imagem
>
> Mysql::Error: Lost connection to MySQL server during query: INSERT
> INTO conteudo_imagem (`comentario`, `nome`, `conteudo_id`, `ordem`,
> `tipo`, `data`) VALUES('''', ''5.png'', 49,
8, ''image/png'',
> x''89504e........
>
> Is there a configuration I should do? What is wrong?
>
> thks
>
> Bruno Reis
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---