Skip to content

Commit 7f6bb2a

Browse files
committed
feature: update download url use file downloads via cloudfront
1 parent 7c88f97 commit 7f6bb2a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/downloads.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { appConfig } from "src/config/app.config";
2+
13
/**
24
* Download utilities for building internal proxy paths.
35
* These helpers keep filename/prefix logic in one place.
@@ -17,7 +19,8 @@ export const getHansardPrefix = (
1719
export const buildDownloadPath = (
1820
filename: string,
1921
ext: "pdf" | "csv"
20-
): string => `/downloads/${getHansardPrefix(filename)}/${filename}.${ext}`;
22+
): string =>
23+
`${appConfig.downloadUrl}/${getHansardPrefix(filename)}/${filename}.${ext}`;
2124

2225
/**
2326
* Trigger a download using the internal proxy route. Falls back to window.open.

0 commit comments

Comments
 (0)