views:

102

answers:

0

with latest zend framework i can't upload file with ajax. in my form there are 3 field (title, description , image) . I'm using zend form. For ajax submit i'm using jquery form plugin (http://jquery.malsup.com/form/) And here is the code for ajax submit.

<script type="text/javascript"> 
        // wait for the DOM to be loaded 
        $(document).ready(function() { 
            // bind 'myForm' and provide a simple callback function 
            $('#myForm').ajaxForm(function() { 
                alert("Thank you for your comment!"); 
            }); 
        }); 
 </script>

But in this case jquery form works when i have selected an image. If i set the image field not required, it not show any error and the form not submit in ajaxway. it seem not working anything. But when i debug i found the form failed validation for empty file. sometimes its showing "File 'mmm' was not uploaded", sometime says exceed php ini size.

so i'm so much confused about this. If anyone can help me with a complete simple upload system with zend form + jquery form plug-in , i'll be thankful. I really need that because i can't move without this. so please help me :(