nforge/hive — pull request #362 by npcode (2013-07-22 08:44:02+00:00)
Title: code: Fix the binary detection for file's contents

* Server does
* Decide whether the file is binary or not.
* Decide the file's mimetype using Tika.
* Then client does
* If the file is not binary, client show the file as image if the
mimetype matches with "image/*" else show a link to download the
file.
* If the file is binary, client show the file as source code and
apply syntax highlight by its language. The language is often
specified by the server in the subtype of the mimetype; If not the
client decides it by the file's extension.