human readable error when file too large
This commit is contained in:
parent
84676edb92
commit
0ca7583819
@ -92,7 +92,9 @@ class Upload extends 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