[Plugin: Contact Form 7] Upload File Size
-
Ok, so all my server settngs are correct to upload 20mb files, but how would i alter this part
if ( ! is_uploaded_file( $file['tmp_name'] ) ) return $result; $file_type_pattern = ''; $allowed_size = 20971520; // default size 20 MB foreach ( $options as $option ) { if ( preg_match( '%^filetypes:(.+)$%', $option, $matches ) ) { $file_types = explode( '|', $matches[1] ); foreach ( $file_types as $file_type ) { $file_type = trim( $file_type, '.' ); $file_type = str_replace( array( '.', '+', '*', '?' ), array( '\.', '\+', '\*', '\?' ), $file_type ); $file_type_pattern .= '|' . $file_type; } } elseif ( preg_match( '/^limit:([1-9][0-9]*)([kKmM]?[bB])?$/', $option, $matches ) ) { $allowed_size = (int) $matches[1]; $kbmb = strtolower( $matches[2] ); if ( 'kb' == $kbmb ) { $allowed_size *= 1024; } elseif ( 'mb' == $kbmb ) { $allowed_size *= 1024 * 1024; } } }
I already changed the bytes under file size
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘[Plugin: Contact Form 7] Upload File Size’ is closed to new replies.