Skip to content

Commit

Permalink
Handling files with Uppercase extesion name
Browse files Browse the repository at this point in the history
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 28, 2011
1 parent 6b7dbcd commit 684c377
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cake/libs/view/media.php
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 684c377

Please sign in to comment.