Dear all, I have a doubt, iam not getting the uploaded file when iam uploading using ajax form like, <% remote_form_for(:videos, :url => {:controller => :videos, :action => :add }, :html => { :multipart => true, :ajaxupload => true }) do |form| %> File <%= form.file_field :uploaded_data %><br/><br/> <%= submit_tag "uploadfile"%> In controller when i call params[:videos][:uploaded_data], iam getting a string like filename <sample.gif> but i was not able to reterive the uploadedfile and when i call methods like params[:videos][:uploaded_data].original_filename, params[:videos][:uploaded_data].read iam getting errors. So could anyone please suggest how to perform file uploading using ajax. Thanks in advance Regards, Martin -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I don''t think it''s possible to upload files with AJAX, but there are some workarounds with hidden iFrames. It''s not very elegant, but it works. See this, for instance: http://kpumuk.info/ruby-on-rails/in-place-file-upload-with-ruby-on-rails/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 10 Jan 2009, at 07:37, dare ruby wrote:> So could anyone please suggest how to perform file uploading using > ajax.http://www.google.com/search?client=safari&rls=en-us&q=rails+upload+ajax&ie=UTF-8&oe=UTF-8 Best regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Use LiveQuery then you don''t need rjs and responds_to_parent http://rails-revlog.blogspot.com/2009/02/ajax-sort-of-file-upload-using.html Guy Boertje --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
pena que parece que só funciona com jQuery... On Wed, Feb 11, 2009 at 7:05 PM, guyb <guyboertje-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> > Use LiveQuery then you don''t need rjs and responds_to_parent > > > http://rails-revlog.blogspot.com/2009/02/ajax-sort-of-file-upload-using.html > > Guy Boertje > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---