Thanks Chris,
but when I try to use the create method, I have the Fatal error :
/Call to undefined method FormHelper::create()
/
That's why I was trying to submit the file by using :
<?php
echo $ajax->submit('Upload', array(
'div' => false,
'url' => "/users/changepic/",
'enctype' => "multipart/form-data",
'update' => 'changepic',
'indicator' => 'loading',
'loading' => "document.getElementById('response').innerHTML =
' <img src=\"/img/ajax-loader.gif\"/> ';"));
?>
But it does not work... I can't upload the file, I get Notices :
/Uninitialized string offset: 0
/
Chris Hartjes a écrit :
> On Fri, Apr 11, 2008 at 3:40 PM, Pierre MARCOURT
> <[EMAIL PROTECTED]> wrote:
>
>> Hi,
>>
>> Is there a way to submit "multipart/form-data" forms with CakePHP / Ajax ?
>> I can't manage uploading files this way...
>> It seems that it is not possible due to security restrictions in the
>> browser, is it ?
>>
>
> http://book.cakephp.org/view/182/forms
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---