show maximagesize warning in a human readable format

This commit is contained in:
rabuzarus 2015-06-29 02:39:08 +02:00
parent e0f6bd6c28
commit a982320ba9
5 changed files with 17 additions and 5 deletions

View file

@ -78,9 +78,9 @@ function wall_attach_post(&$a) {
}
if(($maxfilesize) && ($filesize > $maxfilesize)) {
notice( sprintf(t('File exceeds size limit of %d'), $maxfilesize) . EOL);
echo sprintf(t('File exceeds size limit of %s'), formatBytes($maxfilesize)) . EOL;
@unlink($src);
return;
killme();
}
$r = q("select sum(octet_length(data)) as total from attach where uid = %d ",