Anyone please? :|

On May 26, 12:03 pm, Sumedh <[EMAIL PROTECTED]> wrote:
> Can't I simply do it the code? :|
>
> But request->getFileSize() is not returning anything... :(  ...why
> would that be?
>
> On May 24, 10:01 am, Charley Tiggs <[EMAIL PROTECTED]> wrote:
>
> > Create a folder with several .htaccess templates in them.
>
> > When you want to limit user upload, copy the approach folder and .htaccess 
> > to the appropriate path then init the upload process.  .htacces can control 
> > the upload size but you can't do it directly within the script according to 
> > this page:
>
> > <http://us3.php.net/manual/en/ini.php>
>
> > Maybe more convoluted than you wanted...
>
> > Charley
>
> > Sumedh said on Friday, May 23, 2008:
>
> > >Yeah...but that value will control all the php scripts getting
> > >executed... :(
>
> > >Not very neat, right?
>
> > >I simply want to control upload size of the said file upload box...
>
> > >On May 23, 11:40 am, "Uli Nitsche" <[EMAIL PROTECTED]> wrote:
> > >> Hi,
>
> > >> as far as I remember there is a value in the php.ini which
> > >> must be adapted as well. Not sure, but have a look there.
>
> > >> On Fri, May 23, 2008 at 7:29 AM, Sumedh <[EMAIL PROTECTED]> wrote:
>
> > >> > Hey...someone please say something here??? :)
>
> > >> > On May 22, 2:18 pm, Sumedh <[EMAIL PROTECTED]> wrote:
> > >> >> 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?
>
> > >> --
> > >> Ulrich Nitsche
> > >> ---------------------
> > >> Technische Leitung gutefrage.net GmbHhttp://www.gutefrage.net
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to