<EjsUploader @ref="uploderObj" ID="UploadFiles" ModelType="@model">
<UploaderEvents OnUploadStart="OnFileUploading" FileSelected="onFileSelected" OnRemove="OnFileRemove"></UploaderEvents>
<UploaderTemplates>
<Template>
<ul class="e-upload-files">
<li class="e-upload-file-list" data-file-name="@((context as FileInfo).Name)" title="@((context as FileInfo).Status)">
<span class="wrapper">
<img class="upload-image" alt="Image"
src="@((context as FileInfo).RawFile)">
</span>
<div class="name file-name" title="@((context as FileInfo).Name)">@((context as FileInfo).Name)</div>
<div class="file-size">@((context as FileInfo).Size)</div>
<span class="e-icons e-file-remove-btn" id="removeIcon" @onclick="@removeFile" title="Remove"></span>
<span class="e-upload-icon e-icons e-file-remove-btn" @onclick="@uploadFile" title="Upload" id="iconUpload"></span>
</li>
</ul>
</Template>
</UploaderTemplates>
<UploaderAsyncSettings SaveUrl="https://aspnetmvc.syncfusion.com/services/api/uploadbox/Save" RemoveUrl="https://aspnetmvc.syncfusion.com/services/api/uploadbox/Remove"></UploaderAsyncSettings>
</EjsUploader>
public void OnFileUploading(Syncfusion.EJ2.Blazor.Inputs.UploadingEventArgs args)
{
args.Cancel = true;
} |