This commit is contained in:
yumoqing 2025-09-28 15:57:21 +08:00
parent 0bb98f66e6
commit 1006a45a08

View File

@ -518,8 +518,8 @@ bricks.UiFile = class extends bricks.VBox {
event.preventDefault(); event.preventDefault();
this.set_css('hover', true); this.set_css('hover', true);
var files = []; var files = [];
event.dataTransfer.files.forEach(f => { for (const f of event.dataTransfer.files) {
if (f.type.startsWith(this.opts.accept)){ if (this.opts.accept && f.type.startsWith(this.opts.accept)){
files.push(f); files.push(f);
} }
}); });