Skip to content

Instantly share code, notes, and snippets.

@steamraven
Created June 6, 2011 15:06
Show Gist options
  • Save steamraven/1010424 to your computer and use it in GitHub Desktop.
Save steamraven/1010424 to your computer and use it in GitHub Desktop.
FileZ downlaod mime type patch
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