The system configuration ’Maximum upload size’ is set by default to 1048576 bytes which is 1 Megabyte. This sounds fine. But when I upload a large image file (say 2 Megabytes) it is still getting uploaded. I checked the mcpuk code and on line 57 of manager/media/browser/mcpuk/connectors/php/Commands/FileUpload.php there is the following:
if ($_FILES['NewFile']['size']<($typeconfig['MaxSize']*1024)) {
Now that line is multiplying the max size by 1024 so my max size limit is never reached. If I take the *1024 out it behaves as I would expect.
if ($_FILES['NewFile']['size']<($typeconfig['MaxSize'])) {
Am I missing something or can someone confirm my findings?? as it seems to have been like this for every Modx Evo version I have, right back to 0.9.6.x