Skip to content

Repository files navigation

web-app-url-fetch

An OpenCloud Web extension that adds an Import from URL entry to the upload menu in Files. It asks for a URL and hands it to the oc-url-fetch service, which downloads the file server-side and stores it into the folder you are currently viewing.

The dialog shows where the file will land (<space>/<folder>) and, once the download starts, a live progress bar driven by the service's GET /jobs/{id} endpoint - the transfer keeps running server-side even if you close the dialog.

A browser cannot do this on its own (CORS blocks reading cross-origin responses, and there is no server-side fetch in the web client), so the actual download happens in the backend service. The extension only collects the URL and forwards your session token; the service uploads as you, into your current space.

Build

pnpm install
pnpm build

The build output lands in dist/.

Install

Serve the dist/ folder to OpenCloud as a web app and register it. With the container setup that means mounting dist/ into the web assets apps path and adding the app to apps.yaml:

# apps.yaml
url-fetch:
  config:
    # same-origin path the reverse proxy forwards to oc-url-fetch
    serviceUrl: /url-fetch/fetch

See the OpenCloud web-applications docs for the full installation steps.

Config

key default meaning
serviceUrl /url-fetch/fetch endpoint of the oc-url-fetch service

License

AGPL-3.0

About

Import a file from a URL into OpenCloud (web extension)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages