diff options
Diffstat (limited to 'apps/files/ajax/getstoragestats.php')
-rw-r--r-- | apps/files/ajax/getstoragestats.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/files/ajax/getstoragestats.php b/apps/files/ajax/getstoragestats.php new file mode 100644 index 00000000000..e55e346ed67 --- /dev/null +++ b/apps/files/ajax/getstoragestats.php @@ -0,0 +1,16 @@ +<?php + +// only need filesystem apps +$RUNTIME_APPTYPES = array('filesystem'); + +OCP\JSON::checkLoggedIn(); + +$l=new OC_L10N('files'); +$maxUploadFilesize = OCP\Util::maxUploadFilesize($dir); +$maxHumanFilesize = OCP\Util::humanFileSize($maxUploadFilesize); +$maxHumanFilesize = $l->t('Upload') . ' max. ' . $maxHumanFilesize; + +// send back json +OCP\JSON::success(array('data' => array('uploadMaxFilesize' => $maxUploadFilesize, + 'maxHumanFilesize' => $maxHumanFilesize +))); |