diff --git a/web/src/pages/View.tsx b/web/src/pages/View.tsx index 9dbb1eee1..16489dce2 100644 --- a/web/src/pages/View.tsx +++ b/web/src/pages/View.tsx @@ -62,8 +62,8 @@ const View: React.FC = ({ match, me, er useEffect(() => { if (data?.file) { setLinks({ - raw: `${apiUrl || `${window.location.origin}/api/v1`}/files/${match.params.id}?raw=1`, - download: `${apiUrl || `${window.location.origin}/api/v1`}/files/${match.params.id}?raw=1&dl=1`, + raw: `${process.env.REACT_APP_API_URL || window.location.origin}/api/v1/files/${match.params.id}?raw=1`, + download: `${process.env.REACT_APP_API_URL || window.location.origin}/api/v1/files/${match.params.id}?raw=1&dl=1`, share: `${window.location.origin}/view/${match.params.id}` }) }