Fix importing char on some formats

- Fix importing chars mime types failing on addition mime type information that was not expected (like utf format)
This commit is contained in:
Wolfsblvt 2024-07-29 04:09:13 +02:00
parent b1f17af9fb
commit 0c2df51e2c

View File

@ -8500,7 +8500,7 @@ export async function processDroppedFiles(files, data = new Map()) {
for (const file of files) {
const extension = file.name.split('.').pop().toLowerCase();
if (allowedMimeTypes.includes(file.type) || allowedExtensions.includes(extension)) {
if (allowedMimeTypes.some(x => file.type.startsWith(x)) || allowedExtensions.includes(extension)) {
const preservedName = data instanceof Map && data.get(file);
await importCharacter(file, preservedName);
} else {