PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Image Upload Not Working

  1. I have a file upload on my form and it is working, however, it doesn't always work. When a user uploads a larger file (2MB+) it shows my success message and the form is submitted successfully (I see the post in the dashboard) but the image is not uploaded to my server. I am aware that this could be my web host restricting file size, though I am unsure.

    If it is my web host, would the form still "succeed" when submitting?

    How can I prevent a user from submitting the form successfully with an invalid image size?

    Posted 11 years ago on Friday July 13, 2012 | Permalink
  2. David Peralty

    Can you link to your form? What version of WP and Gravity Forms are you using? Do any files ever get uploaded? If small files work fine, then it is most likely a file size issue with your host or a plugin conflict. If no files upload, then it might be an issue that requires further investigation. Gravity Forms doesn't have very good logging currently when it comes to file uploads, and as such, the form still could succeed without being able to upload the file.

    There are some people that have written custom code to detect image size and return an error using the Gravity Form validation hook.

    Posted 11 years ago on Friday July 13, 2012 | Permalink
  3. If it is my web host, would the form still "succeed" when submitting?

    Unfortunately, yes. If the upload fails, Gravity Forms will not report it as a failure.

    Posted 11 years ago on Friday July 13, 2012 | Permalink
  4. Smaller images do succeed in being uploaded, which is why I have a feeling it's my web host (Netfirms).

    You can test the form here:

    http://torontotype.ca/?page_id=2

    I am running the latest version of Gravity Forms.

    There are some people that have written custom code to detect image size and return an error using the Gravity Form validation hook.

    Do you have links to any examples?

    Posted 11 years ago on Tuesday July 17, 2012 | Permalink
  5. David Peralty

    Here is the script someone came up with, but it might require editing to use:
    http://zzlatev.com/gravity-forms-upload-limits/

    Posted 11 years ago on Tuesday July 17, 2012 | Permalink