summaryrefslogtreecommitdiffstats
path: root/apps/files/index.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-01-18 14:06:00 -0800
committerThomas Müller <thomas.mueller@tmit.eu>2013-01-18 14:06:00 -0800
commit31cc9aa80d4284e13dc95d2ef1428bed78c22d65 (patch)
tree3b42e3a95bc0a92cd75bba16438e9dcf55f49e89 /apps/files/index.php
parentedf3572835ac5a6584fdde7ba7bb1faa64251e2d (diff)
parent5ff29b4348a1dcb9ed32273133b1c787aaf5c72c (diff)
downloadnextcloud-server-31cc9aa80d4284e13dc95d2ef1428bed78c22d65.tar.gz
nextcloud-server-31cc9aa80d4284e13dc95d2ef1428bed78c22d65.zip
Merge pull request #986 from owncloud/fixing-784-master
the maximum upload size is now part of the response of the upload and de...
Diffstat (limited to 'apps/files/index.php')
-rw-r--r--apps/files/index.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/apps/files/index.php b/apps/files/index.php
index 08193eaee7b..1c4b7fbd497 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -28,6 +28,7 @@ OCP\User::checkLoggedIn();
OCP\Util::addStyle('files', 'files');
OCP\Util::addscript('files', 'jquery.iframe-transport');
OCP\Util::addscript('files', 'jquery.fileupload');
+OCP\Util::addscript('files', 'jquery-visibility');
OCP\Util::addscript('files', 'files');
OCP\Util::addscript('files', 'filelist');
OCP\Util::addscript('files', 'fileactions');
@@ -79,13 +80,7 @@ $breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '');
$breadcrumbNav->assign('breadcrumb', $breadcrumb, false);
$breadcrumbNav->assign('baseURL', OCP\Util::linkTo('files', 'index.php') . '?dir=', false);
-$upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize'));
-$post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size'));
-$maxUploadFilesize = min($upload_max_filesize, $post_max_size);
-
-$freeSpace = OC_Filesystem::free_space($dir);
-$freeSpace = max($freeSpace, 0);
-$maxUploadFilesize = min($maxUploadFilesize, $freeSpace);
+$maxUploadFilesize=OCP\Util::maxUploadFilesize($dir);
$permissions = OCP\PERMISSION_READ;
if (OC_Filesystem::isUpdatable($dir . '/')) {