The selected files still appears on fileinput preview after showing the alert “File too Big, please select a file less than 2mb”.
```
echo '<div style="margin-left: 27px;">';
echo $form->field($model, 'value[]')->widget(FileInput::classname(), [
'options' => ['multiple' => true, 'accept' => 'jpg/png/jpeg/pdf/doc/docx/xlsx/*'],
'pluginOptions' => ['allowedFileExtensions' => ['jpg','png','jpeg','pdf', 'doc', 'docx','xlsx'],
'showUpload' => false,
'initialPreview' => $getuploadedfile,
'initialPreviewConfig' => $ImageConfig,
'overwriteInitial' => false
],
'pluginEvents' => [
"change" => 'function() {
if (this.files.length > 0) {
for (var i = 0; i <= this.files.length - 1; i++) {
const fsize = this.files.item(i).size;
const file = Math.round((fsize / 1024));
if (file >= 2048) {
alert("File too Big, please select a file less than 2mb");
this.value = "";
}
}
}
}',
]
])->label(false);
echo '</div>';
```
I want to clear the fileinput after showing that alert. Please help me. I tried the this.fileinput(“clear”) but not worked.