Created
June 6, 2011 15:06
-
-
Save steamraven/1010424 to your computer and use it in GitHub Desktop.
FileZ downlaod mime type patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/controllers/File.php b/app/controllers/File.php | |
index 5f8e311..ef57650 100644 | |
--- a/app/controllers/File.php | |
+++ b/app/controllers/File.php | |
@@ -254,7 +254,7 @@ class App_Controller_File extends Fz_Controller { | |
* @param App_Model_File $file File to send | |
*/ | |
protected function sendFile (App_Model_File $file, $forceDownload = true) { | |
- $mime = file_mime_content_type ($file->getFileName ()); | |
+ $mime = $file->getMimetype(); | |
header('Content-Type: '.$mime); | |
header('Content-Transfer-Encoding: binary'); | |
header('Expires: 0'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment