chore (rewrite): find mimetype

This commit is contained in:
MickaelK 2024-07-01 00:05:04 +10:00
parent aa01a752e1
commit bc29e4fff2

View file

@ -35,5 +35,5 @@ export function opener(file = "", mimes) {
}
function getMimeType(file, mimes = {}) {
return mimes[file.split(".")[1]] || "text/plain";
return mimes[file.split(".").slice(-1)[0]] || "text/plain";
}