Fix #1970 issue drag and dropping skin file

This commit is contained in:
JannisX11 2023-07-29 17:22:58 +02:00
parent a2a1d1a590
commit 9fce77c389
2 changed files with 6 additions and 3 deletions

View File

@ -614,12 +614,15 @@ window.Dialog = class Dialog {
break;
case 'file':
delete data.file;
if (isApp) {
if (data.return_as == 'file' && typeof value == 'object') {
data.file = value;
data.value = data.file.name;
} else if (isApp) {
data.value = value;
} else {
data.content = value;
}
data.bar.find('input').val(settings.streamer_mode.value ? `[${tl('generic.redacted')}]` : value);
data.bar.find('input').val(settings.streamer_mode.value ? `[${tl('generic.redacted')}]` : data.value);
break;
}
}

View File

@ -155,7 +155,7 @@ async function loadImages(files, event) {
} else if (method == 'minecraft_skin') {
Formats.skin.setup_dialog.show();
Formats.skin.setup_dialog.setFormValues({
texture: isApp ? files[0].path : files[0].content
texture: files[0]
})
} else if (method == 'extrude_with_cubes') {