nexus
nexus copied to clipboard
Preview Plugin: Unable to preview CSV file
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.
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.