diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-11-08 22:48:29 +0100 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-11-08 22:48:29 +0100 |
commit | 2bd28acdc6a1cb4aacd76790705895f20dc05533 (patch) | |
tree | fc103707d99c06b9a0dc56ae1551461911873b42 /files/index.php | |
parent | 452a4637647d6dbd54b275aead765d3a2329813e (diff) | |
download | nextcloud-server-2bd28acdc6a1cb4aacd76790705895f20dc05533.tar.gz nextcloud-server-2bd28acdc6a1cb4aacd76790705895f20dc05533.zip |
take free disk space (and user quota) into account for max upload size
Diffstat (limited to 'files/index.php')
-rw-r--r-- | files/index.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/files/index.php b/files/index.php index 8bb5b618d87..4b3bbd1bfd4 100644 --- a/files/index.php +++ b/files/index.php @@ -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() ); |