diff options
Diffstat (limited to 'apps/files/ajax/download.php')
-rw-r--r-- | apps/files/ajax/download.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/files/ajax/download.php b/apps/files/ajax/download.php index 28ce4c6542e..aedd86b6419 100644 --- a/apps/files/ajax/download.php +++ b/apps/files/ajax/download.php @@ -50,4 +50,13 @@ if(isset($_GET['downloadStartSecret']) setcookie('ocDownloadStarted', $_GET['downloadStartSecret'], time() + 20, '/'); } -OC_Files::get($dir, $files_list, $_SERVER['REQUEST_METHOD'] == 'HEAD'); +$server_params = array( 'head' => \OC::$server->getRequest()->getMethod() == 'HEAD' ); + +/** + * Http range requests support + */ +if (isset($_SERVER['HTTP_RANGE'])) { + $server_params['range'] = \OC::$server->getRequest()->getHeader('Range'); +} + +OC_Files::get($dir, $files_list, $server_params); |