mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02: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:
@ -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 {
|
||||
|
Reference in New Issue
Block a user