Gregory Hill
2005-Dec-14 15:35 UTC
RE: Form.serialize and Ajax.Request -> fileserialization and encoding
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. Greg _______________________________________________ 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:48 UTC
Re: 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