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.
pnpm install
pnpm buildThe build output lands in dist/.
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/fetchSee the OpenCloud web-applications docs for the full installation steps.
| key | default | meaning |
|---|---|---|
serviceUrl |
/url-fetch/fetch |
endpoint of the oc-url-fetch service |
AGPL-3.0