Permalink
Browse files

Fixed GridFS Download Content-Type Bug

Previously, the Content-Type header on downloading a GridFS file was always incorrect as the $mime_types set up were not accessible in the doDownloadFile() method.

This patch fixed this issue.
  • Loading branch information...
1 parent 797745a commit ff3caee30f7814475e6eb2491ce30f68786bed6b @chrisgittings chrisgittings committed Apr 10, 2012
Showing with 2 additions and 0 deletions.
  1. +1 −0 app/controllers/collection.php
  2. +1 −0 app/lib/mime/types.php
View
1 app/controllers/collection.php
@@ -633,6 +633,7 @@ public function doModifyRow() {
/** download file in GridFS **/
public function doDownloadFile() {
+ global $mime_types;
$this->db = xn("db");
$this->collection = xn("collection");
$this->id = xn("id");
View
1 app/lib/mime/types.php
@@ -1,5 +1,6 @@
<?php
/** came from http://snipplr.com/view.php?codeview&id=1937 **/
+global $mime_types;
$mime_types = array("323" => "text/h323",
"acx" => "application/internet-property-stream",
"ai" => "application/postscript",

0 comments on commit ff3caee

Please sign in to comment.