<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Catch upload file size exceeded error</title>
		<link>https://legacy.forums.gravityhelp.com/topic/catch-upload-file-size-exceeded-error</link>
		<description>Gravity Support Forums Topic: Catch upload file size exceeded error</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 16:51:00 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/catch-upload-file-size-exceeded-error" rel="self" type="application/rss+xml" />

		<item>
			<title>David Peralty on "Catch upload file size exceeded error"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/catch-upload-file-size-exceeded-error#post-58679</link>
			<pubDate>Fri, 11 May 2012 11:46:02 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">58679@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;allastair - You'll want to look at the PHP tutorials out there for detecting the file size of an uploaded file and comparing it against your own set value. This page might help - &#60;a href=&#34;http://php.net/manual/en/features.file-upload.php&#34; rel=&#34;nofollow&#34;&#62;http://php.net/manual/en/features.file-upload.php&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>allastair on "Catch upload file size exceeded error"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/catch-upload-file-size-exceeded-error#post-58669</link>
			<pubDate>Fri, 11 May 2012 10:07:17 +0000</pubDate>
			<dc:creator>allastair</dc:creator>
			<guid isPermaLink="false">58669@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I have the same issue regarding file sizes and could use some guidance on how to do the validation as well.  The form validation hook seems pretty straightforward but what is the proper syntax to check for the size of the file in an upload field?  Has anyone worked this out?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>WebEndev on "Catch upload file size exceeded error"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/catch-upload-file-size-exceeded-error#post-46425</link>
			<pubDate>Sun, 15 Jan 2012 10:54:24 +0000</pubDate>
			<dc:creator>WebEndev</dc:creator>
			<guid isPermaLink="false">46425@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;gbotica - would you be wiling to share your solution to this, if you have one?&#60;br /&#62;
Thanks!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>raptor235 on "Catch upload file size exceeded error"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/catch-upload-file-size-exceeded-error#post-44020</link>
			<pubDate>Wed, 14 Dec 2011 11:19:53 +0000</pubDate>
			<dc:creator>raptor235</dc:creator>
			<guid isPermaLink="false">44020@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hey gbotica, did figure out how to catch the error?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>raptor235 on "Catch upload file size exceeded error"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/catch-upload-file-size-exceeded-error#post-44019</link>
			<pubDate>Wed, 14 Dec 2011 11:11:02 +0000</pubDate>
			<dc:creator>raptor235</dc:creator>
			<guid isPermaLink="false">44019@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Can the admins please provide an answer as to how to catch this error... 1.7 is nice and all when it gets here for the time being we need a solution ASAP... please and thank you
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Catch upload file size exceeded error"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/catch-upload-file-size-exceeded-error#post-39173</link>
			<pubDate>Thu, 27 Oct 2011 23:06:36 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">39173@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;@sascha, I wish there were a Google Translate for PHP like that.  Someday maybe.&#60;/p&#62;
&#60;p&#62;Regarding the rest, give it a shot and let us know where you get stuck.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sascha on "Catch upload file size exceeded error"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/catch-upload-file-size-exceeded-error#post-39072</link>
			<pubDate>Thu, 27 Oct 2011 04:24:41 +0000</pubDate>
			<dc:creator>sascha</dc:creator>
			<guid isPermaLink="false">39072@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Could this be leveraged by GF?&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;UPLOAD_ERR_FORM_SIZE Error Code (Use with the MAX_FILE_SIZE Form Field)

The UPLOAD_ERR_FORM_SIZE error code never appears if there is no MAX_FILE_SIZE hidden field in the HTML/XHTML form that contains the &#38;lt;input type=&#38;quot;file&#38;quot;&#38;gt; element.

The MAX_FILE_SIZE hidden field is used like this:

&#38;lt;form action=&#38;quot;file_upload.php&#38;quot; method=&#38;quot;post&#38;quot; enctype=&#38;quot;multipart/form-data&#38;quot;&#38;gt;
  &#38;lt;p&#38;gt;
    &#38;lt;input name=&#38;quot;MAX_FILE_SIZE&#38;quot; value=&#38;quot;1048576&#38;quot; type=&#38;quot;hidden&#38;quot;/&#38;gt;
    &#38;lt;input name=&#38;quot;myFile&#38;quot; type=&#38;quot;file&#38;quot;/&#38;gt;
    &#38;lt;input type=&#38;quot;submit&#38;quot;/&#38;gt;
  &#38;lt;/p&#38;gt;
&#38;lt;/form&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Together with this explanation: &#60;a href=&#34;http://www.php.net/manual/en/features.file-upload.errors.php&#34; rel=&#34;nofollow&#34;&#62;http://www.php.net/manual/en/features.file-upload.errors.php&#60;/a&#62;&#60;br /&#62;
But I guess all those error messages happen after the form is actually submitted right?&#60;br /&#62;
There is a thought:&#60;br /&#62;
I put a function in that Gform validation filter, that uploads the file(s) temporarily to the server, then check if any uploads failed (I could check each file I assume - using that MAX_FILE_SIZE Form Field from above) and then set validation to true or false and give an according error message?&#60;br /&#62;
Does that make sense? Is there a Google translate for PHP - like say what you want and it writes the function for you :-)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sascha on "Catch upload file size exceeded error"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/catch-upload-file-size-exceeded-error#post-39071</link>
			<pubDate>Thu, 27 Oct 2011 04:04:53 +0000</pubDate>
			<dc:creator>sascha</dc:creator>
			<guid isPermaLink="false">39071@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Chris, Carl or anyone really,&#60;br /&#62;
how would I check if an upload has failed using that filter? I understand the filter, but I do not know how to check for a server error.&#60;br /&#62;
Basically how do I check for the upload error that the server throws back? I just would like to prevent the form being submitted if there is an upload error and then just give a message &#34;Your file size might be too big - individual files need to be less than 2MB&#34;.&#60;br /&#62;
Any ideas are welcome...
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Catch upload file size exceeded error"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/catch-upload-file-size-exceeded-error#post-39059</link>
			<pubDate>Wed, 26 Oct 2011 23:57:21 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">39059@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Enhancing the file upload field is slated for inclusion in 1.7.  &#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/forums/topic/file-uploads-max-file-size-restrict-type#post-38992&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/file-uploads-max-file-size-restrict-type#post-38992&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;WordPress 3.3 has revamped the media handling, and Gravity Forms will likely be able to leverage that.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Catch upload file size exceeded error"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/catch-upload-file-size-exceeded-error#post-39058</link>
			<pubDate>Wed, 26 Oct 2011 23:54:58 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">39058@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Regarding the file type or file extension, you could do some rudimentary checking before submission by adding some jQuery to your form.  Gravity Forms would not handle it because it has not been submitted to Gravity Forms yet.&#60;/p&#62;
&#60;p&#62;There has not been functionality added to check the file size of the upload and the &#60;a href=&#34;http://www.gravityhelp.com/forums/topic/catch-upload-file-size-exceeded-error#post-22417&#34; rel=&#34;nofollow&#34;&#62;advice from Carl&#60;/a&#62; remains the best work around I know of right now.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
