diff --git a/.changeset/gorgeous-coins-begin.md b/.changeset/gorgeous-coins-begin.md new file mode 100644 index 000000000..7b3f6cd41 --- /dev/null +++ b/.changeset/gorgeous-coins-begin.md @@ -0,0 +1,5 @@ +--- +'renterd': patch +--- + +The copyable file download URLs in the file context menu have been updated to match the new API. diff --git a/apps/renterd/contexts/filesManager/downloads.tsx b/apps/renterd/contexts/filesManager/downloads.tsx index 2126b00b9..7d34daa55 100644 --- a/apps/renterd/contexts/filesManager/downloads.tsx +++ b/apps/renterd/contexts/filesManager/downloads.tsx @@ -11,6 +11,7 @@ import { getKeyFromPath, } from '../../lib/paths' import { ObjectData } from './types' +import { workerObjectKeyRoute } from '@siafoundation/renterd-types' type DownloadProgress = ObjectData & { controller: AbortController @@ -167,7 +168,10 @@ export function useDownloads() { const getFileUrl = useCallback( (path: FullPath, authenticated: boolean) => { const { bucket, key } = bucketAndKeyParamsFromPath(path) - const workerPath = `/worker/objects/${key}?bucket=${bucket}` + const workerPath = `${workerObjectKeyRoute.replace( + ':key', + key + )}?bucket=${bucket}` // Parse settings.api if its set otherwise URL const origin = settings.api || location.origin const scheme = origin.startsWith('https') ? 'https' : 'http'