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();
this.set_css('hover', true);
var files = [];
event.dataTransfer.files.forEach(f => {
if (f.type.startsWith(this.opts.accept)){
for (const f of event.dataTransfer.files) {
if (this.opts.accept && f.type.startsWith(this.opts.accept)){
files.push(f);
}
});