From 46dff9f52c7bfb24ec72256bf8becaec25c488f4 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Mon, 31 May 2021 12:21:11 -0700 Subject: [PATCH] IO-1163 Compatibility for HEIC. --- .../jobs-documents-gallery/job-documents.utility.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/components/jobs-documents-gallery/job-documents.utility.js b/client/src/components/jobs-documents-gallery/job-documents.utility.js index 8dde8cc66..054c51063 100644 --- a/client/src/components/jobs-documents-gallery/job-documents.utility.js +++ b/client/src/components/jobs-documents-gallery/job-documents.utility.js @@ -1,9 +1,12 @@ import { DetermineFileType } from "../documents-upload/documents-upload.utility"; export const GenerateSrcUrl = (value) => { + let extension = value.extension; + if (extension && extension.includes("heic")) extension = "jpg"; + return `${process.env.REACT_APP_CLOUDINARY_ENDPOINT}/${DetermineFileType( value.type - )}/upload/${value.key}${value.extension ? `.${value.extension}` : ""}`; + )}/upload/${value.key}${extension ? `.${extension}` : ""}`; }; export const GenerateThumbUrl = (value) =>