diff --git a/api/js/etemplate/et2_widget_file.ts b/api/js/etemplate/et2_widget_file.ts index a7862c0fc0..e21c2043be 100644 --- a/api/js/etemplate/et2_widget_file.ts +++ b/api/js/etemplate/et2_widget_file.ts @@ -200,7 +200,6 @@ export class et2_file extends et2_inputWidget jQuery(span).removeClass('et2_file_spanActive'); } }); - if (this.options.accept) this.input.attr('accept', this.options.accept); let self = this; // trigger native input upload file if (!this.options.readonly) this.span.click(function(){self.input.click()}); @@ -218,6 +217,8 @@ export class et2_file extends et2_inputWidget { // This may be a problem submitting via ajax } + if (this.options.accept) this.input.attr('accept', this.options.accept); + if(this.options.progress) { let widget = this.getRoot().getWidgetById(this.options.progress);