human readable error when file too large
This commit is contained in:
parent
f735936a7d
commit
fd9443cf84
@ -92,7 +92,9 @@ class Upload implements Extension {
|
||||
$event->veto("Upload failed; disk nearly full");
|
||||
}
|
||||
if(filesize($event->tmpname) > $config->get_int('upload_size')) {
|
||||
$event->veto("File too large (".filesize($event->tmpname)." > ".($config->get_int('upload_size')).")");
|
||||
$size = to_shorthand_int(filesize($event->tmpname));
|
||||
$limit = to_shorthand_int($config->get_int('upload_size'));
|
||||
$event->veto("File too large ($size > $limit)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user