MAX_FILE_SIZE and upload_max_filesize

A place for users and developers of the Xataface to discuss and receive support.

MAX_FILE_SIZE and upload_max_filesize

Postby kevinwen » Thu Mar 04, 2010 6:07 pm

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.
kevinwen
 
Posts: 109
Joined: Mon Dec 28, 2009 3:44 pm

Re: MAX_FILE_SIZE and upload_max_filesize

Postby shannah » Thu Mar 04, 2010 6:20 pm

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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: MAX_FILE_SIZE and upload_max_filesize

Postby kevinwen » Fri Mar 05, 2010 10:59 am

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.
kevinwen
 
Posts: 109
Joined: Mon Dec 28, 2009 3:44 pm

Re: MAX_FILE_SIZE and upload_max_filesize

Postby shannah » Tue Mar 09, 2010 8:40 am

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).
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 17 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved