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

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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.2
    • Fix Version/s: None
    • Component/s: Files API
    • Labels:
    • Affected Branches:
      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

              Assignee:
              Unassigned Unassigned
              Reporter:
              matteo Matteo Scaramuccia
              Participants:
              Component watchers:
              Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: