summaryrefslogtreecommitdiffstats
path: root/files/index.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-09-23 20:08:45 +0200
committerFlorian Pritz <bluewind@xinu.at>2011-09-24 18:42:06 +0200
commit152fc7d94d71c178079388eaeb38c3e4b40fe080 (patch)
tree2aca40872771706d8030ab18455f5108d3d4f264 /files/index.php
parentef07b599cbe06bc6111ebc5584a18f75a0ca89a2 (diff)
downloadnextcloud-server-152fc7d94d71c178079388eaeb38c3e4b40fe080.tar.gz
nextcloud-server-152fc7d94d71c178079388eaeb38c3e4b40fe080.zip
files: fix max filesize check
php check both, upload_max_filesize and post_max_size, when uploading a file so we should do the same when figuring out the maximum size. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'files/index.php')
-rw-r--r--files/index.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/files/index.php b/files/index.php
index bba8dc4951e..aa081d48804 100644
--- a/files/index.php
+++ b/files/index.php
@@ -78,7 +78,9 @@ $breadcrumbNav = new OC_Template( "files", "part.breadcrumb", "" );
$breadcrumbNav->assign( "breadcrumb", $breadcrumb );
$breadcrumbNav->assign( "baseURL", OC_Helper::linkTo("files", "index.php?dir="));
-$maxUploadFilesize = OC_Helper::computerFileSize(ini_get('upload_max_filesize'));
+$upload_max_filesize = OC_Helper::computerFileSize(ini_get('upload_max_filesize'));
+$post_max_size = OC_Helper::computerFileSize(ini_get('post_max_size'));
+$maxUploadFilesize = min($upload_max_filesize, $post_max_size);
$tmpl = new OC_Template( "files", "index", "user" );
$tmpl->assign( "fileList", $list->fetchPage() );