Skip to content
Permalink
Browse files

Handling files with Uppercase extesion name

MediaView fixed to work correctly with file names when file extesion is UPPERCASE

Signed-off-by: mark_story <mark@mark-story.com>
  • Loading branch information...
CauanCabral authored and markstory committed May 27, 2011
1 parent 6b7dbcd commit 684c377d0b10dcb626f3f5a39aa8367cbef83954
Showing with 2 additions and 2 deletions.
  1. +2 −2 cake/libs/view/media.php
@@ -131,7 +131,7 @@ function render() {
$this->mimeType = array_merge($this->mimeType, $mimeType);
}
if (isset($extension) && isset($this->mimeType[$extension]) && connection_status() == 0) {
if (isset($extension) && isset($this->mimeType[strtolower($extension)]) && connection_status() == 0) {
$chunkSize = 8192;
$buffer = '';
$fileSize = @filesize($path);
@@ -202,7 +202,7 @@ function render() {
}
$this->_header(array(
'Last-Modified: ' . $modified,
'Content-Type: ' . $this->mimeType[$extension],
'Content-Type: ' . $this->mimeType[strtolower($extension)],
'Content-Length: ' . $fileSize));
}
$this->_output();

0 comments on commit 684c377

Please sign in to comment.
You can’t perform that action at this time.