Add filesize limits for document rendering engines and support partial/complete rendering

Summary:
Depends on D19238. Ref T13105. Give document engines some reasonable automatic support for degrading gracefully when someone tries to hexdump a 100MB file or similar.

Also, make "Video" sort above "Audio" for files which could be rendered either way.

Test Plan: Viewed audio, video, image, and other files. Adjusted limits and saw full, partial, and fallback/error rendering.

Maniphest Tasks: T13105

Differential Revision: https://secure.phabricator.com/D19239
This commit is contained in:
epriestley
2018-03-19 12:36:39 -07:00
parent f646153f4d
commit 4aafce6862
12 changed files with 172 additions and 27 deletions

View File

@@ -27,6 +27,7 @@ JX.behavior('document-engine', function() {
view = new JX.PHUIXActionView()
.setName(spec.name)
.setIcon(spec.icon)
.setIconColor(spec.color)
.setHref(spec.engineURI);
view.setHandler(JX.bind(null, function(spec, e) {