Skip to content

Dataset Page: Getting Dataset with Preview URL results in 404 error #1025

Description

@ekraffmiller

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    GREI Re-archGREI re-architecture-related

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions