Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-38495

'application/octet-stream' as the default MIME type

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.4.2
    • None
    • Files API
    • MOODLE_24_STABLE

    Description

      While working at MDL-38468 I found that files with an unknown MIME type are actually streamed as 'unknown':

      ...
      Content-Disposition: inline; filename="Moodle_org open-source community-based tools for learning_org-.mht"
      ...
      Content-Type: document/unknown
      ...
      

      as per:

      lib/filelib.php

      ...
      function &get_mimetypes_array() {
          static $mimearray = array (
              'xxx'  => array ('type'=>'document/unknown', 'icon'=>'unknown'),
      ...
      

      Why not using application/octet-stream by default?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              matteo Matteo Scaramuccia
              Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: