summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/js/files.js1
-rw-r--r--apps/files/lib/helper.php2
2 files changed, 3 insertions, 0 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index fdaa3aa3342..0a2f1aef013 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -41,6 +41,7 @@ Files={
}
if (response.data !== undefined && response.data.uploadMaxFilesize !== undefined) {
$('#max_upload').val(response.data.uploadMaxFilesize);
+ $('#free_space').val(response.data.freeSpace);
$('#upload.button').attr('original-title', response.data.maxHumanFilesize);
$('#usedSpacePercent').val(response.data.usedSpacePercent);
Files.displayStorageWarnings();
diff --git a/apps/files/lib/helper.php b/apps/files/lib/helper.php
index eaff28178ea..2f4a9790662 100644
--- a/apps/files/lib/helper.php
+++ b/apps/files/lib/helper.php
@@ -6,6 +6,7 @@ class Helper
{
public static function buildFileStorageStatistics($dir) {
$l = new \OC_L10N('files');
+ $freeSpace=OCP\Util::freeSpace($dir);
$maxUploadFilesize = \OCP\Util::maxUploadFilesize($dir);
$maxHumanFilesize = \OCP\Util::humanFileSize($maxUploadFilesize);
$maxHumanFilesize = $l->t('Upload') . ' max. ' . $maxHumanFilesize;
@@ -15,6 +16,7 @@ class Helper
return array('uploadMaxFilesize' => $maxUploadFilesize,
'maxHumanFilesize' => $maxHumanFilesize,
+ 'freeSpace' => $freeSpace,
'usedSpacePercent' => (int)$storageInfo['relative']);
}