[MAGNOLIA-4079] Serving of file types (especially video files) whose MIME type is not set up Created: 20/Dec/11  Updated: 05/Jan/16  Resolved: 05/Jan/16

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 4.5
Fix Version/s: 4.5.x

Type: Bug Priority: Major
Reporter: Natascha Desmarais Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: dms, stream, video
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen shot 2011-12-20 at 3.06.48 PM.png    
Issue Links:
dependency
is depended upon by MAGNOLIA-3855 h.264 (mp4) video in a html 5 video t... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

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.



 Comments   
Comment by Michael Mühlebach [ 05/Jan/16 ]

Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes.
Thanks for taking the time to raise this issue. As you are no doubt aware this issue has been on our backlog for some time now with very little movement.
I'm going to close this to set expectations so the issue doesn't stay open for years with few updates. If the issue is still relevant please feel free to reopen it or create a new issue.

Generated at Mon Feb 12 03:52:27 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.