aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/ajax/download.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/ajax/download.php')
-rw-r--r--apps/files/ajax/download.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/files/ajax/download.php b/apps/files/ajax/download.php
index b9a4ddaf5e7..163232ef001 100644
--- a/apps/files/ajax/download.php
+++ b/apps/files/ajax/download.php
@@ -33,4 +33,11 @@ OCP\User::checkLoggedIn();
$files = $_GET["files"];
$dir = $_GET["dir"];
-OC_Files::get($dir, $files, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false);
+$files_list = json_decode($files);
+if ($files_list === NULL ) {
+ $files_list = array($files);
+}
+
+foreach ($files_list as $f) error_log("file: $f");
+
+OC_Files::get($dir, $files_list, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false);