feature/IO-2282-VSSTA-Integration: - checkpoint

This commit is contained in:
Dave Richer
2025-04-15 10:46:49 -04:00
parent 5b30daefe5
commit d444821cf7
9 changed files with 205 additions and 63 deletions

View File

@@ -0,0 +1,17 @@
/**
* @description Determines the file type based on the filetype string.
* @note Also needs to be updated in the mobile app utility.
* @param filetype
* @returns {string}
*/
const determineFileType = (filetype) => {
if (!filetype) return "auto";
else if (filetype.startsWith("image")) return "image";
else if (filetype.startsWith("video")) return "video";
else if (filetype.startsWith("application/pdf")) return "image";
else if (filetype.startsWith("application")) return "raw";
return "auto";
};
module.exports = determineFileType;