diff options
author | Björn Schießle <schiessle@owncloud.com> | 2012-10-05 11:38:00 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2012-10-05 11:38:00 +0200 |
commit | dcad7aec82e641158a6b1a5c690714ea9d56c3f8 (patch) | |
tree | dfba9a04e7442424a3bdbf881600879896ca797a | |
parent | f4136854b6e8ccf88e3e0de3ff1202845be8f903 (diff) | |
download | nextcloud-server-dcad7aec82e641158a6b1a5c690714ea9d56c3f8.tar.gz nextcloud-server-dcad7aec82e641158a6b1a5c690714ea9d56c3f8.zip |
fixed download of complete publically shared folder
-rw-r--r-- | apps/files_sharing/public.php | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index aa074e629da..2d6437d819f 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -82,14 +82,7 @@ if (isset($_GET['file']) || isset($_GET['dir'])) { } // Download the file if (isset($_GET['download'])) { - $mimetype = OC_Filesystem::getMimeType($path); - header('Content-Transfer-Encoding: binary'); - header('Content-Disposition: attachment; filename="'.basename($path).'"'); - header('Content-Type: '.$mimetype); - header('Content-Length: '.OC_Filesystem::filesize($path)); - OCP\Response::disableCaching(); - @ob_clean(); - OC_Filesystem::readfile($path); + OC_Files::get($path, '', $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); } else { OCP\Util::addStyle('files_sharing', 'public'); OCP\Util::addScript('files_sharing', 'public'); |