BTW,
1. It is correctly uploading smaller than 1 MB files...
2. I have declared the form multipart correctly...
On May 22, 2:10 pm, Sumedh <[EMAIL PROTECTED]> wrote:
> I want to allow users to upload image files of upto 1 MB in size...
>
> I tried with YML...
>
> fields:
> ...
> file:
> file: True
> sfFileValidator:
> mime_types:
> - 'image/jpeg'
> - 'image/png'
> - 'image/gif'
> - 'image/bmp'
> mime_types_error: Please upload only PNG, JPEG, GIF, BMP images
> max_size: 1024000
> max_size_error: Max size is 1024Kb
>
> It doesn't work...it correctly checks for file type...but it doesn't
> give any error for file size...it doesn't upload it either if it's
> greater than 1 MB...but doesn't generate any error...just goes to
> success page...
>
> In code, I tried this -
>
> $fileName = $this->getRequest()->getFileName('file');
> $fileSize = $this->getRequest()->getFileSize($fileName);
> $this->logMessage("######## file size = " . $fileSize);
>
> And I get nothing in the fileSize variable...though I get fileName
> correctly...
>
> So, a simple task is eating up all the time... :(
>
> Any ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" 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/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---