aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/reportManager/reportManagerUtils.ts
diff options
context:
space:
mode:
authorSophie Zhang <sophie_zhang@brown.edu>2023-07-27 13:50:32 -0400
committerSophie Zhang <sophie_zhang@brown.edu>2023-07-27 13:50:32 -0400
commit7535e446e9a8aa2a0afaf84c667f3a58f437d99b (patch)
tree78900f170d3669b8501d4af392431a9433be37ce /src/client/util/reportManager/reportManagerUtils.ts
parent955ca75035aaa223fc8bc07416ca4c31e7a9d1c2 (diff)
fixed media on localhost, not really practical but still:
Diffstat (limited to 'src/client/util/reportManager/reportManagerUtils.ts')
-rw-r--r--src/client/util/reportManager/reportManagerUtils.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/util/reportManager/reportManagerUtils.ts b/src/client/util/reportManager/reportManagerUtils.ts
index 45727e203..b95417aa1 100644
--- a/src/client/util/reportManager/reportManagerUtils.ts
+++ b/src/client/util/reportManager/reportManagerUtils.ts
@@ -84,7 +84,7 @@ export const formatTitle = (title: string, userEmail: string): string => `${titl
// C: /Users/dash/Documents/GitHub/Dash-Web/src/server/public/files/images/upload_8008dbc4b6424fbff14da7345bb32eb2.png
// -> https://browndash.com/files/images/upload_8008dbc4b6424fbff14da7345bb32eb2_l.png
export const fileLinktoServerLink = (fileLink: string): string => {
- const serverUrl = 'https://browndash.com/';
+ const serverUrl = window.location.href.includes('browndash') ? 'https://browndash.com/' : 'http://localhost:1050/';
const regex = 'public';
const publicIndex = fileLink.indexOf(regex) + regex.length;