• Hi,

    I am having an issue were it seems any file over 2mb will not send. I have the limit set at 9mb code below.

    [file yourfile limit:9mb filetypes:jpg|jpeg|png]

    When i attempt to send anything over 2mb i get an error “validation errors occurred, please confirm the fields and submit again”

    Under the choose file button on the form then reads “failed to upload file. Error occurred”

    Any ideas people??

    thanks

    https://ww.wp.xz.cn/plugins/contact-form-7/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Thread Starter captainbang1

    (@captainbang1)

    Thanks for your advice Takayuki, but i cannot find “php.ini” under the plugin editor.

    i cannot find any files matching this in the link you sent

    can you advise?
    thanks

    Thread Starter captainbang1

    (@captainbang1)

    Is this what i need to amend?

    $allowed_file_types = array_unique( $allowed_file_types );
    $file_type_pattern = implode( ‘|’, $allowed_file_types );

    $allowed_size = 1048576; // default size 1 MB

    if ( $file_size_a = $tag->get_option( ‘limit’ ) ) {
    $limit_pattern = ‘/^([1-9][0-9]*)([kKmM]?[bB])?$/’;

    foreach ( $file_size_a as $file_size ) {
    if ( preg_match( $limit_pattern, $file_size, $matches ) ) {
    $allowed_size = (int) $matches[1];

    if ( ! empty( $matches[2] ) ) {
    $kbmb = strtolower( $matches[2] );

    if ( ‘kb’ == $kbmb )
    $allowed_size *= 1024;
    elseif ( ‘mb’ == $kbmb )
    $allowed_size *= 1024 * 1024;

    Taken from the Editing contact-form-7/modules/file.php (inactive)

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    No. It’s PHP config, not plugin files. If you are not familiar with that, contact your host support. They can help you.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘File attachment Limit’ is closed to new replies.