WordPress Trac: Ticket #11110: SWF Upload reports file too big even though it is smaller than the max size displayed.https://core.trac.wordpress.org/ticket/11110
<p>
The issue is that swfupload.js can trigger a file_exceeds_size_limit error due to two different causes (that I know of) and WordPress assumes the cause is one of them.
</p>
<p>
In wp_include/script-loader.php, we define the response to file_exceeds_size_limit as:
</p>
<p>
'file_exceeds_size_limit' =&gt; sprintf(<span class="underline">('This file is too big. Your php.ini upload_max_filesize is %s.'), @ini_get('upload_max_filesize')),
</span></p>
<p>
However, either max_post_size or upload_max_filesize can cause an file_exceeds_size_limit.
</p>
<p>
So, if my max_post_size is the still the default 8M, and my host increased upload_max_filesize to say 16M (from the default of 2M), uploading a 12M file would generate a "This file is too big. Your php.ini upload_max_filesize is 16M" and result in a very confused client.
</p>
<p>
A solution to this can be found at <a class="ext-link" href="http://www.php.net/manual/en/ini.core.php#79564"><span class="icon">​</span>http://www.php.net/manual/en/ini.core.php#79564</a> I'm not sure if that's the final code we want, but the idea is the right one... Basically find the min of those two values (converting from M or K or w/e for compatibility) and display THAT in the error message.
</p>
en-usWordPress Trachttps://core.trac.wordpress.org/chrome/site/your_project_logo.pnghttps://core.trac.wordpress.org/ticket/11110
Trac 1.0.1dd32Mon, 09 Nov 2009 22:29:50 GMTstatus changed; resolution set; milestone deletedhttps://core.trac.wordpress.org/ticket/11110#comment:1
https://core.trac.wordpress.org/ticket/11110#comment:1
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>duplicate</em>
</li>
<li><strong>milestone</strong>
<em>Unassigned</em> deleted
</li>
</ul>
<p>
Fixed in trunk, See:
</p>
<p>
(In <a class="changeset" href="https://core.trac.wordpress.org/changeset/11863" title="Show correct max upload filesize error message, props dd32, fixes #10495">[11863]</a>) Show correct max upload filesize error message, props dd32, fixes <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/10495" title="defect (bug): swfupload file_exceeds_size_limit fails to take into consideration PHP's ... (closed: fixed)">#10495</a>
</p>
Ticket