File upload max size

In the Knowledge base, it says that adding a file size limit will be added to the UI soon.

Any approximate time frame on this?

Thanks!

Not yet. It's not planned for the next release, but that's about all I can tell you.

I found the following code in the codex :

add_filter('frm_validate_field_entry', 'validate_custom_file_size', 10, 3);
function validate_custom_file_size($errors, $field, $value){
if ($field->type == 'file' and (isset($_FILES['file'.$field->id])) and !empty($_FILES['file'.$field->id]['name'])){ //check if the file is too big
if ((int)$_FILES['file'.$field->id]['size'] > 1500000){ //change this number to the max size you would like. 100000 bytes = 1 KB
if (ICL_LANGUAGE_CODE == 'fr') {
// Insérer le code ici pour la langue française (fr)
$errors['field'.$field->id] = 'Le fichier est trop volumineux. Veuillez réessayer avec un fichier inférieur à 2mb.';
}
elseif (ICL_LANGUAGE_CODE == 'en') {
// Insérer le code ici pour la langue anglaise (EN)
$errors['field'.$field->id] = 'That file is too big. Please upload another that weights less than 2MB.';
}
}
}
return $errors;
}?>

 

However, it doesn't work with a file that weights 4mb... It does block a 1,9mb file... Any idea why?

Thanks!

It's likely that your php.ini does not allow files that large. From the knowledge base:

The upload size limit defaults to whatever is set in your php.ini on your server. If you would like your users to be able to upload bigger files than are currently allowed on your site, you will need to edit your php.ini. You may need to increase the upload size limit, max time, and post max settings in your php.ini in order to allow large files.

Is there a limit in the forms itself that will limit an upload size? Been toying with the settings:

On the .htacccess i have set up:

php_value post_max_size 512M
php_value max_input_vars 5000
php_value upload_max_filesize 32M
php_value max_execution_time 120 (added this just now; still get timeout)
And on wp-config i have:

define('WP_MEMORY_LIMIT', '1200M');

But I get timed out when trying to upload a 6 meg file (despite changing my browser timeout settings). I still get a timeout message. But uploading a 1-2 meg file seems to work fine.


Attachment:
artisanphpinfo

Looks like you need to increase max_execution_time.

No that didn't work either (tried 360)

Plus i should note that, after the timeout, the entire site crashes for 5 minutes, then returns. I was counting the seconds from the time I press submit to the timeout error. It's not even 1 minute.

i also have a plugin on WP that read the memory overview:

PHP Version : 5.3.14 / 64Bit OS
Memory limit : 1200 MByte
Memory usage : 54.84 MByte

You may need to contact your web host for pointers on what else needs adjusting. This isn't controlled within Formidable.

Turns out it was the hosting company (Rackspace). They have a 30-second timeout. While it was a mission to get an answer, they eventually led me to this fix (just for future reference):

http://www.cloudsitesrock.com/?ac=post&id=9&uid=1&p=0&cat=6&m=0&y=0

 

 

Topic closed.