Moodle
  1. Moodle
  2. MDL-15987

If you upload an Office 2007 document to moodle 1.9.2, the file downloads as the <Office 2003 file type

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.6, 1.8.7, 1.9.3
    • Fix Version/s: 1.8.8, 1.9.4
    • Component/s: Files API
    • Labels:
      None
    • Environment:
      Redhat Linux Enterprise 5, PHP 5.1.6, MySQL 5.0.45
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Rank:
      31226

      Description

      If you upload an Office 2007 document to moodle and attempt to download it. Example being Word 2007 .DOCX file, it sends the file as .DOC, stripping the .DOCX file type. Here are the actual Office 2007 MIME Types that I had to specify in filelib.php and a copy of the filelib.php that works on multiple sites. Reference http://moodle.org/mod/forum/discuss.php?d=102716.

      application/onenote onetoc onetoc2 onetmp onepkg
      application/vnd.ms-excel.addin.macroEnabled.12 xlam
      application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
      application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
      application/vnd.ms-excel.template.macroEnabled.12 xltm
      application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
      application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
      application/vnd.ms-powerpoint.slide.macroEnabled.12 sldm
      application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
      application/vnd.ms-powerpoint.template.macroEnabled.12 potm
      application/vnd.ms-word.document.macroEnabled.12 docm
      application/vnd.ms-word.template.macroEnabled.12 dotm
      application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
      application/vnd.openxmlformats-officedocument.presentationml.slide sldx
      application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
      application/vnd.openxmlformats-officedocument.presentationml.template potx
      application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
      application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
      application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
      application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx

      1. filelib.php
        46 kB
        Aaron Cowell
      2. filelib.php
        46 kB
        Aaron Cowell

        Issue Links

          Activity

          Hide
          Eloy Lafuente (stronk7) added a comment -

          2007 word/excel/powerpoint correct mimetypes added both to 18_STABLE and 19_STABLE.

          Thanks Aaron (I forgot to add credit to you in the cvs commit messages, sorry!)

          Resolving as fixed. Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - 2007 word/excel/powerpoint correct mimetypes added both to 18_STABLE and 19_STABLE. Thanks Aaron (I forgot to add credit to you in the cvs commit messages, sorry!) Resolving as fixed. Ciao
          Hide
          Petr Škoda added a comment -

          thanks, closing

          Show
          Petr Škoda added a comment - thanks, closing
          Hide
          miki Alliel added a comment -

          This problem happens to me only in IE and Chrome but on FireFox it works fine.

          Did it happen to you with IE and not FF too?

          thanks

          Show
          miki Alliel added a comment - This problem happens to me only in IE and Chrome but on FireFox it works fine. Did it happen to you with IE and not FF too? thanks
          Hide
          Aaron Cowell added a comment -

          I did not test in other browsers to see if there was issues with them as well. It was only tested using IE 7 and 8. For an explaination of why FF didn't have the problem, read this article. https://developer.mozilla.org/en/How_Mozilla_determines_MIME_Types. Thanks for the posting!

          Show
          Aaron Cowell added a comment - I did not test in other browsers to see if there was issues with them as well. It was only tested using IE 7 and 8. For an explaination of why FF didn't have the problem, read this article. https://developer.mozilla.org/en/How_Mozilla_determines_MIME_Types . Thanks for the posting!

            People

            • Votes:
              13 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: