From 0204a4f0f239bae1d1f9ab3c89d3e6f3d225838e Mon Sep 17 00:00:00 2001 From: Ronald Q Date: Wed, 4 May 2016 10:30:40 -0400 Subject: [PATCH] =?UTF-8?q?HOR-917=20El=20tama=C3=B1o=20m=C3=A1ximo=20perm?= =?UTF-8?q?itido=20para=20subir=20un=20file=20en=20el=20endpoint=20light/c?= =?UTF-8?q?onfig=20sin=20Auth=20no=20es=20el=20correcto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workflow/engine/src/ProcessMaker/BusinessModel/Light.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Light.php b/workflow/engine/src/ProcessMaker/BusinessModel/Light.php index bd14c33c9..180cadd82 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Light.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Light.php @@ -1308,7 +1308,12 @@ class Light } $response['listLanguage'] = $languagesList; if (isset($params['fileLimit']) && $params['fileLimit']) { - $response['fileLimit'] = $this->return_bytes(ini_get('post_max_size')); + $postMaxSize = $this->return_bytes(ini_get('post_max_size')); + $uploadMaxFileSize = $this->return_bytes(ini_get('upload_max_filesize')); + if ($postMaxSize < $uploadMaxFileSize){ + $uploadMaxFileSize = $postMaxSize; + } + $response['fileLimit'] = $uploadMaxFileSize; } if (isset($params['tz']) && $params['tz']) { $response['tz'] = isset($_SESSION['USR_TIME_ZONE'])?$_SESSION['USR_TIME_ZONE']:$sysConf['time_zone'];