MAX_FILE_SIZE and upload_max_filesize
Posted:
Thu Mar 04, 2010 6:07 pm
by kevinwen
I have the problem uploading large size of file. I figured out that MAX_FILE_SIZE is defined as same as upload_max_filesize in php.ini. What if i want to set the MAX_FILE_SIZE to a number less than upload_max_filesize? where in my application could I define this? Thanks.
Re: MAX_FILE_SIZE and upload_max_filesize
Posted:
Thu Mar 04, 2010 6:20 pm
by shannah
There are 2 options to be concerned with: the form max size and the upload max size.
http://www.captain.at/howto-php-upload-max-size.php
Re: MAX_FILE_SIZE and upload_max_filesize
Posted:
Fri Mar 05, 2010 10:59 am
by kevinwen
Yes, I knew those options we should be concerned about. However, what I would like to do is to set MAX_FILE_SIZE less than upload_max_filesize in xataface. I know in QuickForm.pph there is a function call setMaxFileSize(). When you pass a number into this funciton, the MAX_FILE_SIZE will be set to this number. How can I do that in my application? Thanks.
Re: MAX_FILE_SIZE and upload_max_filesize
Posted:
Tue Mar 09, 2010 8:40 am
by shannah
HTML_QuickForm supports the maxfilesize rule (
http://www.midnighthax.com/quickform.php#doc_chap4) which means that Xataface will support this as a validator. ie.
- Code: Select all
validators:maxfilesize=1024
(this example limits file size to 1024 bytes or 1kb).