summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/config/mimes.php4
-rw-r--r--system/libraries/Upload.php2
-rw-r--r--user_guide/changelog.html17
3 files changed, 20 insertions, 3 deletions
diff --git a/application/config/mimes.php b/application/config/mimes.php
index f00e5b6ed..100f7d442 100644
--- a/application/config/mimes.php
+++ b/application/config/mimes.php
@@ -93,8 +93,8 @@ $mimes = array( 'hqx' => 'application/mac-binhex40',
'avi' => 'video/x-msvideo',
'movie' => 'video/x-sgi-movie',
'doc' => 'application/msword',
- 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
- 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+ 'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip'),
+ 'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip'),
'word' => array('application/msword', 'application/octet-stream'),
'xl' => 'application/excel',
'eml' => 'message/rfc822',
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 05511b5d3..fe5907ab2 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -1055,7 +1055,7 @@ class CI_Upload {
if (DIRECTORY_SEPARATOR !== '\\' && function_exists('exec'))
{
$output = array();
- @exec('file --brief --mime-type ' . escapeshellarg($file['tmp_path']), $output, $return_code);
+ @exec('file --brief --mime-type ' . escapeshellarg($file['tmp_name']), $output, $return_code);
if ($return_code === 0 && strlen($output[0]) > 0) // A return status code != 0 would mean failed execution
{
$this->file_type = rtrim($output[0]);
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 167616e57..a20f27956 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -57,6 +57,23 @@ Change Log
<h1>Change Log</h1>
+<h2>Version 2.1.1</h2>
+<p>Release Date: not yet released</p>
+
+<ul>
+ <li>General Changes
+ <ul>
+ <li>Fixed support for docx, xlsx files in mimes.php.</li>
+ </ul>
+ </li>
+</ul>
+
+<h3>Bug fixes for 2.1.1</h3>
+<ul>
+ <li>Fixed a bug (#697) - A wrong array key was used in the Upload library to check for mime-types.</li>
+</ul>
+
+
<h2>Version 2.1.0</h2>
<p>Release Date: November 14, 2011</p>