Spaces:
Paused
Paused
Download src/lib/utils/getShareUrl.ts from vollsteksolutions/test: direct link, hf CLI and curl.
- Browser
- Download file 274 Bytes
-
https://huggingface.co/spaces/vollsteksolutions/test/resolve/main/src/lib/utils/getShareUrl.ts
- Command line
-
hf download hf://spaces/vollsteksolutions/test/src/lib/utils/getShareUrl.ts
-
curl -L -o getShareUrl.ts https://huggingface.co/spaces/vollsteksolutions/test/resolve/main/src/lib/utils/getShareUrl.ts
274 Bytes
| import { base } from "$app/paths"; | |
| import { env as envPublic } from "$env/dynamic/public"; | |
| export function getShareUrl(url: URL, shareId: string): string { | |
| return `${ | |
| envPublic.PUBLIC_SHARE_PREFIX || `${envPublic.PUBLIC_ORIGIN || url.origin}${base}` | |
| }/r/${shareId}`; | |
| } | |