aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Foiani <sotech117@michaels-mbp-5.devices.brown.edu>2022-08-25 00:18:45 -0400
committerMichael Foiani <sotech117@michaels-mbp-5.devices.brown.edu>2022-08-25 00:18:45 -0400
commit9c32686d81ab993c71676a55c1c34df5cf9ec00d (patch)
treef91a0330c197667e6203db4f1bc4b4f89942d052
parente1efc192ec6105c97c59f313e6efcbc617ff65d5 (diff)
fix showing image bug
-rw-r--r--src/client/util/ReportManager.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/ReportManager.tsx b/src/client/util/ReportManager.tsx
index d680b47ac..180d8294f 100644
--- a/src/client/util/ReportManager.tsx
+++ b/src/client/util/ReportManager.tsx
@@ -106,7 +106,7 @@ export class ReportManager extends React.Component<{}> {
// turns an upload link into a servable link
// ex:
- // C: /Users/dash/Documents/GitHub/Dash-Web/src/server/public/files/images/upload_8008dbc4b6424fbff14da7345bb32eb2_l.png
+ // C: /Users/dash/Documents/GitHub/Dash-Web/src/server/public/files/images/upload_8008dbc4b6424fbff14da7345bb32eb2.png
// -> http://localhost:1050/files/images/upload_8008dbc4b6424fbff14da7345bb32eb2_l.png
private fileLinktoServerLink = (fileLink: string) => {
const serverUrl = 'https://browndash.com/';
@@ -114,7 +114,7 @@ export class ReportManager extends React.Component<{}> {
const regex = 'public'
const publicIndex = fileLink.indexOf(regex) + regex.length;
- const finalUrl = `${serverUrl}${fileLink.substring(publicIndex + 1)}`;
+ const finalUrl = `${serverUrl}${fileLink.substring(publicIndex + 1).replace('.', '_l.')}`;
return finalUrl;
}