Is it possible to create a multipart form that uploads the file using an AJAX remote call? I''m having a hard time figuring out the syntax if it is possible! Thanks, Tom --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi, I can tell you that is absolutely not possible to upload files with AJAX or Javascript of any kind. JS has always been prevented from accessing the client filesystem as a basic security feature. The only way is regular POST hth On Apr 30, 5:26 pm, TomRossi7 <t...-5bxIUPmzHicFraO2wh7vUA@public.gmane.org> wrote:> Is it possible to create a multipart form that uploads the file using > an AJAX remote call? I''m having a hard time figuring out the syntax > if it is possible! > > Thanks, > Tom--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
http://blog.caboo.se/articles/2007/4/2/ajax-file-upload TomRossi7 wrote:> Is it possible to create a multipart form that uploads the file using > an AJAX remote call? I''m having a hard time figuring out the syntax > if it is possible! > > Thanks, > Tom-- 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 -~----------~----~----~----~------~----~------~--~---
Which is but one solution to the problem. I prefer SWFUpload (http:// swfupload.mammon.se/), because it doesn''t involve polling the server for upload progress (the small flash movie monitors the upload stream) and it allows better file selection (filtering of files, max size, multiple selections in dialog, ). You can see an implementation at http://demo.placid.be/albums/11;manage On 01 May 2007, at 04:26, mixplate wrote:> http://blog.caboo.se/articles/2007/4/2/ajax-file-upload > > TomRossi7 wrote: >> Is it possible to create a multipart form that uploads the file using >> an AJAX remote call? I''m having a hard time figuring out the syntax >> if it is possible!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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
It isn''t possible. You can upload to a hidden div, though. Here''s a plugin that helps with that: http://agilewebdevelopment.com/plugins/responds_to_parent -- Building an e-commerce site with Rails? http://agilewebdevelopment.com/rails-ecommerce Meet up at RailsConf: http://railsconf2007.conferencemeetup.com/ On Apr 30, 2007, at 2:26 PM, TomRossi7 wrote:> > Is it possible to create a multipart form that uploads the file using > an AJAX remote call? I''m having a hard time figuring out the syntax > if it is possible! > > Thanks, > Tom--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---