Paul Shannon
2005-Dec-14 15:51 UTC
RE: Form.serialize and Ajax.Request ->fileserialization and encoding
I''ve not looked into how it''s done but adding an attachment in Gmail (UK version) uploads the file without refreshing the window, and http://www.yousendit.com <http://www.yousendit.com/> appears to send a file via some sort of RPC or AJAX. Maybe this could be another starting point for you. Paul Shannon Web Applications Developer Codeweavers Limited Tel: 0870 443 0888 Fax: 0870 443 0889 -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Tarek Ziadé Sent: 14 December 2005 15:49 To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Form.serialize and Ajax.Request ->fileserialization and encoding On 12/14/05, Gregory Hill <Gregory_Hill-l9nu40+TWxQ@public.gmane.org> wrote: 1/ I am trying to send a multipart/form-data encoded form through Ajax with by calling Form.serialize, but it seems that files fields does not support this very well Is there any special mode to use ? You cannot send a file through Ajax. You''ll have to submit the form normally. To mimic Ajax functionality, you could set the target to a hidden iframe, and on the server side, have it load some javascript that affects the parent window after it''s done. Good luck. Ok, i''ll see if i can use encoded hidden b64 text field then, thx Greg _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs -- Tarek Ziadé | www.afpy.org Python - why settle for snake oil when you can have the whole snake? (Mark Jackson) _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Tarek Ziadé
2005-Dec-14 15:58 UTC
Re: Form.serialize and Ajax.Request ->fileserialization and encoding
On 12/14/05, Paul Shannon <Paul.Shannon-PJ7GQ4yptbvJuAXsgwRMTA@public.gmane.org> wrote:> > I''ve not looked into how it''s done but adding an attachment in Gmail (UKversion) uploads the file without refreshing the window, and > http://www.yousendit.com appears to send a file via some sort of RPC or > AJAX. Maybe this could be another starting point for you. >ok thx, i''ll dig into this. if i find a way to do it i''ll give some feedback here, because this would be a valuabvle feature for scriptaculous i think *Paul Shannon*> > *Web Applications Developer* > > * * > > *Codeweavers Limited* > > > > Tel: 0870 443 0888 > > Fax: 0870 443 0889 > > -----Original Message----- > *From:* rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto: > rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] *On Behalf Of *Tarek Ziadé > *Sent:* 14 December 2005 15:49 > *To:* rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > *Subject:* Re: [Rails-spinoffs] Form.serialize and Ajax.Request->fileserialization and encoding > > > > On 12/14/05, *Gregory Hill* <Gregory_Hill-l9nu40+TWxQ@public.gmane.org> wrote: > > > > 1/ I am trying to send a multipart/form-data encoded form through Ajax > with > by calling Form.serialize, but it seems that files fields does not > support this very well > > Is there any special mode to use ? > > > > You cannot send a file through Ajax. You''ll have to submit the form > normally. To mimic Ajax functionality, you could set the target to a hidden > iframe, and on the server side, have it load some javascript that affects > the parent window after it''s done. Good luck. > > > Ok, i''ll see if i can use encoded hidden b64 text field then, thx > > > > Greg > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > -- > Tarek Ziadé | www.afpy.org > Python - why settle for snake oil when you can have the whole snake? > (Mark Jackson) > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >-- Tarek Ziadé | www.afpy.org Python - why settle for snake oil when you can have the whole snake? (Mark Jackson) _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs