Skip to content

Commit 65fbbff

Browse files
committed
fix(renterd): object download urls
1 parent c9477b9 commit 65fbbff

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.changeset/gorgeous-coins-begin.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'renterd': patch
3+
---
4+
5+
The copyable file download URLs in the file context menu have been updated to match the new API.

apps/renterd/contexts/filesManager/downloads.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
getKeyFromPath,
1212
} from '../../lib/paths'
1313
import { ObjectData } from './types'
14+
import { workerObjectKeyRoute } from '@siafoundation/renterd-types'
1415

1516
type DownloadProgress = ObjectData & {
1617
controller: AbortController
@@ -167,7 +168,10 @@ export function useDownloads() {
167168
const getFileUrl = useCallback(
168169
(path: FullPath, authenticated: boolean) => {
169170
const { bucket, key } = bucketAndKeyParamsFromPath(path)
170-
const workerPath = `/worker/objects/${key}?bucket=${bucket}`
171+
const workerPath = `${workerObjectKeyRoute.replace(
172+
':key',
173+
key
174+
)}?bucket=${bucket}`
171175
// Parse settings.api if its set otherwise URL
172176
const origin = settings.api || location.origin
173177
const scheme = origin.startsWith('https') ? 'https' : 'http'

0 commit comments

Comments
 (0)