From c11b5cea3c34cbb4f9f849b6940fa09c0e517f3d Mon Sep 17 00:00:00 2001 From: Michiel Vugteveen Date: Wed, 23 Nov 2011 10:09:52 +0100 Subject: docx and xlsx have a zip/application mimetype --- application/config/mimes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 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', -- cgit v1.2.3-24-g4f1b From 8ff2da1c7457cfd04a28776705cea64cbb96716a Mon Sep 17 00:00:00 2001 From: Michiel Vugteveen Date: Wed, 23 Nov 2011 10:09:57 +0100 Subject: tmp_path does not exists, should be tmp_name --- system/libraries/Upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]); -- cgit v1.2.3-24-g4f1b From 0ce875c2b75b17ad0697fb9bc9d77513b3d2a48e Mon Sep 17 00:00:00 2001 From: Michiel Vugteveen Date: Wed, 23 Nov 2011 11:49:49 +0100 Subject: changelog updated --- user_guide/changelog.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 167616e57..3fac8bb45 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -57,6 +57,23 @@ Change Log

Change Log

+

Version 2.1.1

+

Release Date: not yet released

+ +
    +
  • General Changes +
      +
    • Fixed support for docx, xlsx files in mimes.php.
    • +
    +
  • +
+ +

Bug fixes for 2.1.1

+
    +
  • Fixed a bug (#697) - A wrong array key was used in de Upload library to check for mime-types.
  • +
+ +

Version 2.1.0

Release Date: November 14, 2011

-- cgit v1.2.3-24-g4f1b From 8ed78098369cd445bae796d0cd31b34cbc02585a Mon Sep 17 00:00:00 2001 From: Michiel Vugteveen Date: Wed, 23 Nov 2011 12:21:37 +0100 Subject: dutch typo --- user_guide/changelog.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 3fac8bb45..a20f27956 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -70,7 +70,7 @@ Change Log

Bug fixes for 2.1.1

    -
  • Fixed a bug (#697) - A wrong array key was used in de Upload library to check for mime-types.
  • +
  • Fixed a bug (#697) - A wrong array key was used in the Upload library to check for mime-types.
-- cgit v1.2.3-24-g4f1b