• Resolved diegobgl96

    (@diegobgl96)


    Hello,

    In one of my client website, we have 4 different contact forms.

    In all of the forms, there is a file attachment field, and what I notice is that max file size is only 2mb, and some of his clients try to send him files and they can’t because there is a limit of 2mb.

    But in the form we have put a limit of 10mb and does not work.
    Code – “[file UploadPlan limit:10mb]”

    When we try to send files above 2mb appears this message bellow the file field – “Failed to upload file. Error occurred.” And in the end of the contact form this message – “Validation errors occurred. Please confirm the fields and submit it again.”

    How can I fix this problem?

    Thanks Diego

    • This topic was modified 7 years, 6 months ago by diegobgl96.
Viewing 6 replies - 1 through 6 (of 6 total)
  • This may be a limit set in your server’s PHP configuration. If you go to the Media section in admin, can you upload files larger that 2M? If not, then look at your web host’s knowledgebase for raising upload limits.

    Thread Starter diegobgl96

    (@diegobgl96)

    Hello @deltafactory

    Thanks for your response.

    Regarding the media uploads file the max in the website is 64mb, it used to be 2mb but I have changed it for 64mb, I don’t think is that.

    Thanks

    danescoga

    (@danescoga)

    Hi there,

    I Cant send files bigger than 2mb either, do you know why?

    My config is:
    [file file-848 limit:5mb]
    and my php. ini is set to 64mb

    karaptsias

    (@karaptsias)

    I found the answer in another forum, it works for me:

    “To allow files bigger than 1Mb(?), I had to edit

    wp-content/plugins/contact-form-7/modules/file.php
    and changes 1048576 to 10048576

    $allowed_size = 10048576;
    This will allow ContactForm7 to accept files until 10Mb files, if we have the server configured to it.”

    deltafactory

    (@deltafactory)

    @karaptsias, that isn’t recommended since it won’t survive an update of the plugin.

    The limit parameter is the correct way to set the max file size. The docs have the full details, https://contactform7.com/file-uploading-and-attachment/

    @diegobgl96, if you’re still having the problem did you make sure to modify both of the related settings in php.ini?

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Contact Form 7 don’t allow me to upload a file above 2mb’ is closed to new replies.