summaryrefslogtreecommitdiffstats
path: root/apps/files/ajax/delete.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2012-12-20 17:16:01 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2012-12-20 17:16:53 +0100
commit39d874cd902a4e3d4f7ae313ec5e15bafe35df13 (patch)
tree5ff19b3755fc02f6f9eecd64996094e2bed388dd /apps/files/ajax/delete.php
parentbdc8d0098adfb0225bc4a67ab72344a203448e34 (diff)
downloadnextcloud-server-39d874cd902a4e3d4f7ae313ec5e15bafe35df13.tar.gz
nextcloud-server-39d874cd902a4e3d4f7ae313ec5e15bafe35df13.zip
the maximum upload size is now part of the response of the upload and delete operation.
the maximum upload size is updated within the browser once an upload or delete operation has been finished
Diffstat (limited to 'apps/files/ajax/delete.php')
-rw-r--r--apps/files/ajax/delete.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/apps/files/ajax/delete.php b/apps/files/ajax/delete.php
index 6532b76df21..bb1f3fff87b 100644
--- a/apps/files/ajax/delete.php
+++ b/apps/files/ajax/delete.php
@@ -21,8 +21,20 @@ foreach($files as $file) {
}
}
+// updated max file size after upload
+$l=new OC_L10N('files');
+$maxUploadFilesize=OCP\Util::maxUploadFilesize($dir);
+$maxHumanFilesize=OCP\Util::humanFileSize($maxUploadFilesize);
+$maxHumanFilesize=$l->t('Upload') . ' max. '.$maxHumanFilesize;
+
if($success) {
- OCP\JSON::success(array("data" => array( "dir" => $dir, "files" => $files )));
+ OCP\JSON::success(array("data" => array( "dir" => $dir, "files" => $files,
+ 'uploadMaxFilesize'=>$maxUploadFilesize,
+ 'maxHumanFilesize'=>$maxHumanFilesize
+ )));
} else {
- OCP\JSON::error(array("data" => array( "message" => "Could not delete:\n" . $filesWithError )));
+ OCP\JSON::error(array("data" => array( "message" => "Could not delete:\n" . $filesWithError,
+ 'uploadMaxFilesize'=>$maxUploadFilesize,
+ 'maxHumanFilesize'=>$maxHumanFilesize
+ )));
}