Hi,
Unfortunately, Ajax doesn''t allow you to upload files.
You have to use a hidden iFrame for this, which isn''t natively
supported by Prototype at the moment (i.e., you''re on your own).
Regards,
Tobie
On Oct 22, 2:49 am, The-PISW
<csmith0...-bJEeYj9oJeDQT0dZR+AlfA@public.gmane.org>
wrote:> Hey,
> quick question regardring forms, headers etc.
>
> I imagine others have come across this before and maybe it''s super
> simple, but I''m new enough to AJAX and to Prototype that I need a
> little help.
>
> The situation is that I''m trying to use AJAX to send a request to
a
> script that recieves various pieces of data from the request to insert
> a new row into a MySQL table. This part seems fairly
> straightforward. The part that gets complex is that one of the fields
> needs to be a file field. I''m using PHP to upload the file. PHP
> requires that the form containing the file upload has enctype:
> "multipart/form-data".
>
> Obviously the form encoding itself isn''t sent with the request as
it''s
> the ajax request object that''s submitted and not the form itself,
but
> what element of the ajax request do I need to alter (or do I need to
> alter any?) to make this work?
>
> Any help would be appreciated,as always.
>
> Cheers,
> Crispen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---