Skip to content
Snippets Groups Projects
Commit 2bd28acd authored by Robin Appelman's avatar Robin Appelman
Browse files

take free disk space (and user quota) into account for max upload size

parent 452a4637
Branches
No related tags found
No related merge requests found
......@@ -89,6 +89,10 @@ $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);
$freeSpace=OC_Filesystem::free_space('/');
$freeSpace=max($freeSpace,0);
$maxUploadFilesize = min($maxUploadFilesize ,$freeSpace);
$tmpl = new OC_Template( "files", "index", "user" );
$tmpl->assign( "fileList", $list->fetchPage() );
$tmpl->assign( "breadcrumb", $breadcrumbNav->fetchPage() );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment