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

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

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • 2.4.2
    • Files API
    • MOODLE_24_STABLE

      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?

            Unassigned Unassigned
            matteo Matteo Scaramuccia
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.