Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-4079

Serving of file types (especially video files) whose MIME type is not set up

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • 4.5.x
    • 4.5
    • core

      While testing the video player implementation for multiple files I also happened to test a .webm file. There is no MIME type defined in the server config yet, so the change introduced in r52901, r52900 and r52475 will return the default MIME type 'application/octet-stream'. While this might be good for some cases, it also has a major downside: when trying to acces the file directly in my browser (Chrome16.0.9 and FF7.0.1 in this case) it printed out its content instead of playing the file.
      This can be extremely inconvenient for very large files and the log only prints out the following two lines:
      2011-12-20 15:05:00,804 INFO info.magnolia.cms.beans.config.MIMEMapping : Cannot find MIME type for extension "webm"
      2011-12-20 15:09:42,482 WARN info.magnolia.module.cache.filter.CacheFilter : The following URL took longer than 10 seconds (281637 ms) to render. This might cause timeout exceptions on other requests to the same URI. [url=http://localhost:8080/magnolia-empty-webapp/demo-project/multimedia/video-player/main/content/02/videoWebmBinary/oceans-clip.webm], [key=DefaultCacheKey{uri='/demo-project/multimedia/video-player/main/content/02/videoWebmBinary/oceans-clip.webm', serverName='localhost', locale='en', channel='all', params={}', secure='false'}]
      The file plays fine when accessing it on my computer through the browsers (file://...).

      Maybe it would be better to drop this default MIME type for serving from dms and rather make them downloadable. The downside to this is that new formats won't be viewable unless we provide the MIME type server config as well. Maybe make it depend on the size as well: if unknown and size is smaller than 3MBs (just as an example), then use the default mime type, else propose the file as download.

        Acceptance criteria

              Unassigned Unassigned
              ndesmarais Natascha Desmarais
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD