nexus icon indicating copy to clipboard operation
nexus copied to clipboard

Preview Plugin: Unable to preview CSV file

Open samuel-kerrien opened this issue 2 years ago • 1 comments

Nexus Delta v1.8.0-M2 Nexus Fusion 1.7.1 Chrome 101.0.4951.41 Staging environment

Description Steps to reproduce:

  • Open an example resource (BBP only)
  • Open the preview plugin, it has a CSV file (61MB)
  • Click preview, you get an error message saying, Failed to load file.
  • I am able to download the file locally, I confirm it to be a CSV (see below)

As reported by @MFSY the issue isn't related to the file size as originally thought. It appears that the URL used to fetch the CSV file is incorrect. Here is another example (BBP internal):

The distribution pointing to the CSV files contains the following:

"contentUrl": "https://staging.nise.bbp.epfl.ch/nexus/v1/files/neurosciencegraph/datamodels/5b09cfe7-e818-4a42-896f-48b02794fbb2"

When clicking the preview button, a GET is issued on the following URL

https://staging.nise.bbp.epfl.ch/nexus/v1/files/neurosciencegraph/datamodels/https%3A%2F%2Fstaging.nise.bbp.epfl.ch%2Fnexus%2Fv1%2Ffiles%2Fneurosciencegraph%2Fdatamodels%2F5b09cfe7-e818-4a42-896f-48b02794fbb2

In comparison, downloading the CSV file fires a GET on the following URL:

https://staging.nise.bbp.epfl.ch/nexus/v1/files/neurosciencegraph/datamodels/5b09cfe7-e818-4a42-896f-48b02794fbb2

which works.

Screenshot 2022-05-22 at 15.53.19.png

Screenshot 2022-05-22 at 15.54.18.png

samuel-kerrien avatar May 22 '22 13:05 samuel-kerrien

The root cause seems to be that Fusion assumes that the value of the contentUrl property is a resource id rather than the file address.

bogdanromanx avatar Jun 13 '22 12:06 bogdanromanx