Created attachment 519080 [details] drift view on binary file Description of problem: Consider removing (or basing on mime-type) the "View" functionality for binary files Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. drift on a binary file 2. view 3. Actual results: see attachment Expected results: Additional info:
This is a non-trivial problem. An approach like looking at file extensions is not robust. What if a file does not have an extension. Or how do we handle files with extensions we do not recognize.
Adding initial support for determining if a file is a binary type. commit hash: 6abff4105f7a878cb0fb2b8b25a4814c880cc60b The approach take with this commit is simple. DriftManagerBean keeps a set of known binary file extensions (ear, war, zip, etc.) to determine whether or not a file is viewable. Looking at file extensions is easy; however it is not very robust. Files might not have extensions, or the extension could be wrong. Furthermore, there may be extensions of which we are unaware. I think/hope that this commit adequately addresses the issue. If it does not, then I want it to be clear that this could be a much more involved effort. At that point we might look to use something like ModeShape or Apache Tika.
marking verified. this is a step forward from original state. will wait to assess if more is needed here as time progresses.
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE