What steps does it take to reproduce the issue?
Create a draft dataset, and in JSF generate a preview url token
In SPA, go to the dataset page in Incognito, with the preview url token, for example: http://localhost:8000/modern/datasets?privateUrlToken=b06fcca4-ba71-4d01-9776-600e94efbc3c
The problem is that the API for getting the download size doesn't include the previewUrl token, so it returns a 401 error.
To fix this need to add the previewUrl to:
/api/datasets/2/versions/{version}/downloadsize
/api/datasets/:persistentId/versions/{version}/files
/api/datasets/:persistentId/versions/{version}/files/counts
/api/access/datafile/{fileId}
-
Which page(s) does it occur on?
Dataset Page
-
What happens?
404 error
-
To whom does it occur (all users, curators, superusers)?
unauthorized users with preview url token
-
What did you expect to happen?
should display the dataset
To fix this, we first need to update the related js-dataverse use cases for the Dataset Page and File Page, so they accept a preview URL token: IQSS/dataverse-client-javascript#470
What steps does it take to reproduce the issue?
Create a draft dataset, and in JSF generate a preview url token
In SPA, go to the dataset page in Incognito, with the preview url token, for example: http://localhost:8000/modern/datasets?privateUrlToken=b06fcca4-ba71-4d01-9776-600e94efbc3c
The problem is that the API for getting the download size doesn't include the previewUrl token, so it returns a 401 error.
To fix this need to add the previewUrl to:
/api/datasets/2/versions/{version}/downloadsize
/api/datasets/:persistentId/versions/{version}/files
/api/datasets/:persistentId/versions/{version}/files/counts
/api/access/datafile/{fileId}
Which page(s) does it occur on?
Dataset Page
What happens?
404 error
To whom does it occur (all users, curators, superusers)?
unauthorized users with preview url token
What did you expect to happen?
should display the dataset
To fix this, we first need to update the related js-dataverse use cases for the Dataset Page and File Page, so they accept a preview URL token: IQSS/dataverse-client-javascript#470