<style>
.e-upload .e-upload-files .e-icons.e-file-delete-btn {
display: none;
}
</style> |
<div>
<div class="form-group col-md-12">
<div class="control_wrapper">
@Html.EJS().Uploader("UploadFiles").DropArea(".control-fluid").Selected("onFileSelect").AutoUpload(true).AsyncSettings(newSyncfusion.EJ2.Inputs.UploaderAsyncSettings { SaveUrl = @Url.Content("~/Uploader/Save"), RemoveUrl = @Url.Content("~/Uploader/Remove") }).Render()
</div>
</div>
</div>
<script>
function onFileSelect(e) {
var proxy = this;
setTimeout(function () {
proxy.upload(proxy.getFilesData());
}, 100)
}
</script> |
<div>
<div class="form-group col-md-12">
<div class="control_wrapper">
@Html.EJS().Uploader("UploadFiles").DropArea(".control-fluid").Success("onSuccess").Selected("onFileSelect").AutoUpload(true).AsyncSettings(newSyncfusion.EJ2.Inputs.UploaderAsyncSettings { SaveUrl = @Url.Content("~/Uploader/Save"), RemoveUrl = @Url.Content("~/Uploader/Remove") }).Render()
</div>
</div>
</div>
<script>
function onSuccess(e) {
var li = document.querySelector("li[data-file-name='" + e.file.name + "']");
if (li) {
setTimeout(function () {
li.remove();
}, 1000); //specify the time delay here for removing the element.
}
}
</script> |