From 62cbd9b9d8eb0ca1d6f9eb217c1d26f05b3f78fd Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 7 Feb 2026 20:42:25 -0700 Subject: [PATCH] Make the file extension algorithm return if a file wasn't provided --- module/utils/fs.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/module/utils/fs.mjs b/module/utils/fs.mjs index f0b02fd..1edb4cd 100644 --- a/module/utils/fs.mjs +++ b/module/utils/fs.mjs @@ -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;