clowder-framework / clowder

A data management system that allows users to share, annotate, organize and analyze large collections of datasets. It provides support for extensible metadata annotation using JSON-LD and a distribute analytics event bus for automatic curation of uploaded data.
https://clowderframework.org/
University of Illinois/NCSA Open Source License
33 stars 17 forks source link

Multiple previewers load original file instead of preview #411

Open lmarini opened 1 year ago

lmarini commented 1 year ago

Our previewers can be configured to load the raw bytes of the original file or the bytes of a preview object. If an extractor is set to load the preview bytes, for example the text previewer, it will work as expected. But if a second previewer, for example the vega one, triggers on the page, the scala template passes the URL of the original bytes and not that of the preview. The result is that the text previewer will load the original bytes instead of the preview bytes. It looks like the logic in the scala template is the problem.

To Reproduce Steps to reproduce the behavior:

  1. Upload a json/csv file
  2. Run the text summary extractor on it
  3. Text preview will show a shorter file
  4. Add vega spec to metadata
  5. Text preview will show full text