Make the file extension algorithm return if a file wasn't provided

This commit is contained in:
Oliver 2026-02-07 20:42:25 -07:00
parent b983b74816
commit 62cbd9b9d8

View file

@ -147,6 +147,7 @@ export async function uploadFile(path, file) {
};
export function determineFileExtension(file) {
if (!file) return null;
for (const [short, long] of Object.entries(CONST.IMAGE_FILE_EXTENSIONS)) {
if (long === file.type) {
return short;