Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serve exported files from datastore #5942

Merged
merged 8 commits into from
Jan 11, 2022
Merged

Serve exported files from datastore #5942

merged 8 commits into from
Jan 11, 2022

Conversation

fm3
Copy link
Member

@fm3 fm3 commented Jan 5, 2022

Serve exported files from the datastore (which naturally has read access to the data root dir (”binaryData”) where the exports are stored by the webknossos-worker.

New protocol:

  • job result link (generated by backend) now points to datastore download route
  • frontend appends a valid user token
  • when the user clicks that link, the datastore
    • checks that the user may access the job export
    • fetches the job export properties
    • constructs the full file path from those
    • serves the file

TODO Frontend:

  • Add datastore user token to link in list

Steps to test:

  • Set up wk-worker locally
  • Run a tif export job (create bbox in dataset view mode, click export icon, select layer)
  • Download link in jobs list should work when job is finished, should point to datastore route (/data/* instead of /api)

Issues:


@fm3 fm3 self-assigned this Jan 5, 2022
@fm3 fm3 changed the title [WIP] Serve exported files from datastore Serve exported files from datastore Jan 6, 2022
@fm3 fm3 marked this pull request as ready for review January 6, 2022 10:51
@fm3 fm3 requested a review from jstriebel January 6, 2022 10:52
Copy link
Contributor

@jstriebel jstriebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, mostly LGTM 👍 Just two questions:

conf/webknossos.latest.routes Show resolved Hide resolved
app/controllers/UserTokenController.scala Show resolved Hide resolved
@fm3 fm3 requested a review from jstriebel January 11, 2022 08:34
Copy link
Contributor

@jstriebel jstriebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@fm3 fm3 merged commit db4d937 into master Jan 11, 2022
@fm3 fm3 deleted the export-via-datastore branch January 11, 2022 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Download of exported with remote datastore
2 participants