Thanks for the reply Vijay. The problem is, when the form with the large file is submitted, the code in the controller is not executed. This only happens when the file is larger than the post_max_size, if the file is equal or smaller than the post_max_size, I can handle the data pretty well.
Thanks again On Aug 6, 7:52 pm, Vijay Kumbhar <[email protected]> wrote: > You can check this in the controller action from where you are saving the > data. > > Before saving data please calculate the size (*filesize() function*) of the > uploaded file & then do the appropriate action. > > > > On Thu, Aug 6, 2009 at 8:04 PM, OmarC <[email protected]> wrote: > > > Hi everyone. > > > I've got a form, some fields are mandatory and the validation for > > these fields works fine, including a file that must be attached to the > > form. > > If the file is smaller than 5MB the form is saved. > > But, if the submitted file is larger than the php.ini value of > > 'post_max_size', all of the form's data is lost, the validation > > doesn't take place, and I'm taken to the form's page, as if it was > > loaded for the first time. > > > How can I fix this? > > Or, how can I restrict the file's size, before the form is submitted? > > > Any help will be much appreciated. > > > Many thanks. > > -- > Thanks & Regards, > Vijayk. > Co-founder (www.weboniselab.com) > > "You Bring the Dreams, We'll Bring the Means" --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~----------~----~----~----~------~----~------~--~---
