summaryrefslogtreecommitdiffstats
path: root/lib/private/files.php
diff options
context:
space:
mode:
authorFabian Henze <flyser42@gmx.de>2014-04-03 01:17:28 +0200
committerFabian Henze <flyser42@gmx.de>2014-04-03 01:17:28 +0200
commit7cdb16979a6c7e75b71dd8c7c5b39b6482041fb8 (patch)
tree3063e5cd23f3c0d0a4cb46c14c2c79cd26bd6d38 /lib/private/files.php
parent6d378515f8e0d1a88089d58c5cbc3a61df06887b (diff)
downloadnextcloud-server-7cdb16979a6c7e75b71dd8c7c5b39b6482041fb8.tar.gz
nextcloud-server-7cdb16979a6c7e75b71dd8c7c5b39b6482041fb8.zip
Fix setting the max-upload-size for really large values.
php can only parse filesize units up to gigabytes, not terabytes or petabytes.
Diffstat (limited to 'lib/private/files.php')
-rw-r--r--lib/private/files.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/private/files.php b/lib/private/files.php
index bfe6d3c02da..46cb85a6302 100644
--- a/lib/private/files.php
+++ b/lib/private/files.php
@@ -280,9 +280,7 @@ class OC_Files {
return false;
$size -= 1;
} else {
- $size = OC_Helper::humanFileSize($size);
- $size = substr($size, 0, -1); //strip the B
- $size = str_replace(' ', '', $size); //remove the space between the size and the postfix
+ $size = OC_Helper::phpFileSize($size);
}
//don't allow user to break his config -- broken or malicious size input