take free disk space (and user quota) into account for max upload size
This commit is contained in:
parent
452a463764
commit
2bd28acdc6
|
@ -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'));
|
$post_max_size = OC_Helper::computerFileSize(ini_get('post_max_size'));
|
||||||
$maxUploadFilesize = min($upload_max_filesize, $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 = new OC_Template( "files", "index", "user" );
|
||||||
$tmpl->assign( "fileList", $list->fetchPage() );
|
$tmpl->assign( "fileList", $list->fetchPage() );
|
||||||
$tmpl->assign( "breadcrumb", $breadcrumbNav->fetchPage() );
|
$tmpl->assign( "breadcrumb", $breadcrumbNav->fetchPage() );
|
||||||
|
|
Loading…
Reference in New Issue