Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
148675 | Oct 29,2019 11:53 PM UTC | Nov 23,2020 04:16 AM UTC | Blazor | 5 |
![]() |
Tags: File Upload |
<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;
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.