Story #11995

[Workbench] Support more filetypes for in-browser display

Added by Tom Morris about 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Radhika Chippada
Category:
-
Target version:
Start date:
07/19/2017
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
0.5

Description

We should offer the option for in-browser display for more filetypes including: .cwl, .yaml, .csv, .tsv, .vcf, and .bed.

Some of these can be large, but the user can click the Back button and abort the display if they accidentally start downloading a file which is too big.


Subtasks

Task #11998: Review branch 11995-collecion-filetypesResolvedRadhika Chippada

Associated revisions

Revision 0b51ce6b
Added by Radhika Chippada about 2 years ago

closes #11995

Merge branch '11995-collecion-filetypes'

Arvados-DCO-1.1-Signed-off-by: Radhika Chippada <>

History

#1 Updated by Radhika Chippada about 2 years ago

  • Description updated (diff)
  • Assigned To set to Radhika Chippada

#2 Updated by Radhika Chippada about 2 years ago

  • Status changed from New to In Progress

#3 Updated by Radhika Chippada about 2 years ago

  • Story points changed from 1.0 to 0.5

Branch 11995-collecion-filetypes @ be0830dcdc10ff352d89a20fa2a24000a5ca8984

  • The file types .yaml, .csv, .tsv, .vcf can already be previewed. The preview of these files behaves as browser supports it. That is: in Chrome this is doing a download and in Firefox the file is displayed
  • Added .bed and .cwl to supported preview enabled file types
  • The file type .cwl is not in ruby MIME::Types and I added special handling to enable preview for this. However, this may not be a known mime type to the browser and hence how the preview works depends on the browser. In Chrome, the file is downloaded. In Firefox, I get a dialog asking to save the file.

Test run @ https://ci.curoverse.com/job/developer-run-tests/388/

#4 Updated by Lucas Di Pentima about 2 years ago

Just one comment:

  • For the .cwl extension, it only works when it’s in lower case. I tried renaming a *.bed to *.BED and *.csv to *.CSV and it works ok, but it doesn’t with .CWL files, for example (that is, the preview button isn't clickable).

#5 Updated by Tom Clegg about 2 years ago

Including ?disposition=inline in keep-web URIs causes keep-web to generate a Content-Disposition header in the response. This might be enough to force Chrome to display inline content for Preview, regardless of MIME type.

#6 Updated by Radhika Chippada about 2 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Applied in changeset arvados|commit:0b51ce6bfc3c50155de18eb4440021688462fb6a.

Also available in: Atom PDF