Story #11995
closed
[Workbench] Support more filetypes for in-browser display
Added by Tom Morris over 7 years ago.
Updated over 7 years ago.
Assigned To:
Radhika Chippada
Estimated time:
(Total: 0.00 h)
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.
- Description updated (diff)
- Assigned To set to Radhika Chippada
- Status changed from New to In Progress
- 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/
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).
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.
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset arvados|commit:0b51ce6bfc3c50155de18eb4440021688462fb6a.
Also available in: Atom
PDF