mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-12 01:17:39 +01:00
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:
parent
b1f17af9fb
commit
0c2df51e2c
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user