diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-04-14 17:52:49 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-04-14 17:52:49 +0200 |
commit | 5608867edc0c4c7c9135f78800e6a199bfec7ada (patch) | |
tree | cad7b34d7c851dc82b5ec014d85e3cdf0fde23d8 /lib | |
parent | b1bcc60d83866627b1b28a0eda336e0f246dbe8e (diff) | |
download | nextcloud-server-5608867edc0c4c7c9135f78800e6a199bfec7ada.tar.gz nextcloud-server-5608867edc0c4c7c9135f78800e6a199bfec7ada.zip |
use the correct array indexes...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/files.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/files.php b/lib/files.php index aacd2c9e004..a7b83149574 100644 --- a/lib/files.php +++ b/lib/files.php @@ -104,15 +104,15 @@ class OC_Files { header('Content-Type: application/zip'); header('Content-Length: ' . filesize($filename)); }else{ - header('Content-Type: ' . OC_Filesystem::getMimeType($filename)); - header('Content-Length: ' . OC_Filesystem::filesize($filename)); + $fileData=OC_FileCache::get($filename); + header('Content-Type: ' . $fileData['mimetype']); + header('Content-Length: ' . $fileData['size']); } }elseif($zip or !OC_Filesystem::file_exists($filename)){ header("HTTP/1.0 404 Not Found"); $tmpl = new OC_Template( '', '404', 'guest' ); $tmpl->assign('file',$filename); $tmpl->printPage(); -// die('404 Not Found'); }else{ header("HTTP/1.0 403 Forbidden"); die('403 Forbidden'); |