FIX The max size for upload file was not corectly shown

This commit is contained in:
Laurent Destailleur 2018-09-20 16:21:08 +02:00
parent 497ab37204
commit c6470d49b0

View File

@ -127,11 +127,12 @@ class FormFile
if (preg_match('/g$/i',$maxphp)) $maxphp=$maxphp*1024*1024;
if (preg_match('/t$/i',$maxphp)) $maxphp=$maxphp*1024*1024*1024;
// Now $max and $maxphp are in Kb
if ($maxphp > 0) $max=min($max,$maxphp);
$maxmin = $max;
if ($maxphp > 0) $maxmin=min($max,$maxphp);
if ($max > 0)
if ($maxmin > 0)
{
$out .= '<input type="hidden" name="max_file_size" value="'.($max*1024).'">';
$out .= '<input type="hidden" name="max_file_size" value="'.($maxmin*1024).'">';
}
$out .= '<input class="flat minwidth400" type="file"';