Skip to content

Allow integration of custom post endpoint for uploading files #1790

@santilland

Description

@santilland

We want to be able to add/configure a custom asset upload endpoint, for example, the flow for file management in eoxhub would be:

  • Sending PATCH? to upload data, e.g. to:
    • https://hub-otc.eox.at/services/eoxhub-gateway/<ws_id>/workspace-ui/api/tus/public/assets/test.png?override=true
    • The browser seems to do first POST, then HEAD and then PATCH to send the file when using another web client
  • Successful upload gives response 204
  • Asset can be expected to be available under:
    • https://workspace-ui-public.cif.gtif.eox.at/api/public-<somehash>/share/public/assets/test.png

**edit removed:
Seeing that we are providing a story telling hosting solution within EOxHub we want to make sure to provide also a good way to upload media to the story. Currently there is a solution with github, but it has some caveats, especially for larger files like videos.

Now that we can assume a workspace will have a bucket as well as package-r (file browser service) which is protected through the gateway we should look into integrating with this. As far as it is understood there is a restful interface that we could use.
We also have the concept of a public endpoint that does act as a proxy redirecting to a presigned url, so we have a base path that could be configured to access the assets, e.g.:
https://workspace-ui-public.cif.gtif.eox.at/api/public/share/public

I can't seem to find documentation about the restful interface, here are links to relevant libraries:
https://github.com/versioneer-tech/package-r/
based on
https://github.com/filebrowser/filebrowser/

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions