Ya, as Thomas says. You do not want to get the file size of fileName.
FileName is a string and doesn't have a file size.
Use:
$fileSize = $this->getRequest()->getFileSize('file');

Good luck!
Jill

On Jun 3, 4:34 am, "Thomas Rabaix" <[EMAIL PROTECTED]> wrote:
> $this->getRequest()->getFileSize(INPUT_NAME);
>
> Thomas
>
>
>
> On Tue, Jun 3, 2008 at 10:29 AM, Sumedh <[EMAIL PROTECTED]> wrote:
>
> > Thanks Jill...That was a good resource on the topic...
>
> > Thanks Thomas...
>
> > But I am not getting getFileSize() even for smaller sized files...the
> > file gets uploaded correctly...but this value doesn't get anything...
>
> > This is how I am doing it - ('file' is the field of the form)
>
> > $fileName = $this->getRequest()->getFileName('file');
> > $fileSize = $this->getRequest()->getFileSize($fileName);
>
> > Value of $fileName is correctly received...
>
> > My upload_max_filesize is set to 1 MB...
>
> > On Jun 2, 7:34 pm, "Thomas Rabaix" <[EMAIL PROTECTED]> wrote:
> >> please read "php.ini" and not "php.net" ...
>
> >> On Mon, Jun 2, 2008 at 4:33 PM, Thomas Rabaix <[EMAIL PROTECTED]> wrote:
> >> > the value will be empty if the file size  > upload_max_filesize
>
> >> > So change the upload_max_filesize value to match your need :
> >> >  - in php.net
> >> >  - at runtime ini_set('upload_max_filesize', SIZE_IN_BYTES);
>
> >> > Thomas
>
> >> > On Mon, Jun 2, 2008 at 4:00 PM, Jill Elaine <[EMAIL PROTECTED]> wrote:
>
> >> >> This may help:
> >> >>http://www.symfony-project.org/forum/index.php?t=msg&&th=9991&goto=40...
> >> >> I assume you have already read this?
> >> >>http://www.symfony-project.org/cookbook/1_0/upload
>
> >> >> Good luck!
>
> >> > --
> >> > Thomas Rabaix
> >> > Internet Consultant
>
> >> --
> >> Thomas Rabaix
> >> Internet Consultant
>
> --
> Thomas Rabaix
> Internet Consultant
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to