I am trying to do file i/o with rails and rjb and can''t figure out a way to make this work. Here''s what I am trying to do: - a user uploads an image to the server via a standard html form: <%= file_field("blog", "attach") %> - this returns a ruby File object to the controller in params[:blog][:attach] --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
raf wrote:> > I am trying to do file i/o with rails and rjb and can''t figure out a > way to make this work. Here''s what I am trying to do: > - a user uploads an image to the server via a standard html form: > <%= file_field("blog", "attach") %> > - this returns a ruby File object to the controller in > params[:blog][:attach]Are you POSTing the "standard form"? Or by RJS do you mean you are trying to use Ajax? Standard Ajax cannot send a file. Try this system:> With an AJAX like technique using iframe, already used by gmail and > much more,InPlaceUploadermake you uploading your files (images, > flash, movies, musics, ...) without any visible refresh. > > The main goal where to make file uploading as easy as text editing > with InPlaceEditor. > > You can give it a try athttp://inplaceuploader.box.re/ > > The code has been submitted as a patch to control.js (http://dev.rubyonrails.org/ticket/7671) > -- > Sébastien Grosjean - ZenCocoon-- Phlip http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!! --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks for your response. My original post was incomplete and sent in error. Please see the subsequent post for a more full (hopefully better) explanation of what I am trying to do. PS - Ajax is not involved at all. This is a question about rjb (Ruby/ Java bridge) On Mar 5, 4:32 pm, Phlip <phlip2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> raf wrote: > > > I am trying to do file i/o with rails and rjb and can''t figure out a > > way to make this work. Here''s what I am trying to do: > > - a user uploads an image to the server via a standard html form: > > <%= file_field("blog", "attach") %> > > - this returns a ruby File object to the controller in > > params[:blog][:attach] > > Are you POSTing the "standard form"? Or by RJS do you mean you are > trying to use Ajax? > > Standard Ajax cannot send a file. Try this system: > > > With an AJAX like technique using iframe, already used by gmail and > > much more,InPlaceUploadermake you uploading your files (images, > > flash, movies, musics, ...) without any visible refresh. > > > The main goal where to make file uploading as easy as text editing > > with InPlaceEditor. > > > You can give it a try athttp://inplaceuploader.box.re/ > > > The code has been submitted as a patch to control.js (http://dev.rubyonrails.org/ticket/7671) > > -- > > Sébastien Grosjean - ZenCocoon > > -- > Phlip > http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---