diff options
| author | bobzel <zzzman@gmail.com> | 2023-10-10 12:12:14 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-10-10 12:12:14 -0400 |
| commit | 9f4c6d895eb6ff495a99463e8150c5d1dff26c5b (patch) | |
| tree | 161d543d60ae4360bd1133cdad5283af8ab4b094 /src/client/util/reportManager/reportManagerUtils.ts | |
| parent | 3884211ab83db30965a4dc1c4b3133684904ebb9 (diff) | |
| parent | c9d83841221620137e89920198ffaeab2677b439 (diff) | |
merged with master
Diffstat (limited to 'src/client/util/reportManager/reportManagerUtils.ts')
| -rw-r--r-- | src/client/util/reportManager/reportManagerUtils.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/util/reportManager/reportManagerUtils.ts b/src/client/util/reportManager/reportManagerUtils.ts index b95417aa1..22e5eebbb 100644 --- a/src/client/util/reportManager/reportManagerUtils.ts +++ b/src/client/util/reportManager/reportManagerUtils.ts @@ -88,8 +88,13 @@ export const fileLinktoServerLink = (fileLink: string): string => { const regex = 'public'; const publicIndex = fileLink.indexOf(regex) + regex.length; + let finalUrl: string = ''; + if (fileLink.includes('.png') || fileLink.includes('.jpg') || fileLink.includes('.jpeg') || fileLink.includes('.gif')) { + finalUrl = `${serverUrl}${fileLink.substring(publicIndex + 1).replace('.', '_l.')}`; + } else { + finalUrl = `${serverUrl}${fileLink.substring(publicIndex + 1)}`; + } - const finalUrl = `${serverUrl}${fileLink.substring(publicIndex + 1).replace('.', '_l.')}`; return finalUrl; }; |
