Hello, I have a problem with SfUploader. When I call await Uploader.GetFilesDataAsync() and then hit Upload button the validation says that the filetype is not allowed regardless the attribute AllowedExtensions configuration.
@page "/"
@using Syncfusion.Blazor
@using Syncfusion.Blazor.Data
@using Syncfusion.Blazor.DropDowns
@using Syncfusion.Blazor.Inputs
<PageTitle>Index</PageTitle>
<h1>Demo</h1>
<EditForm Model="@example_model" OnValidSubmit="@Sending">
<DataAnnotationsValidator />
<ol>
<li>Select any file with the alowed extension: .doc, .docx, .xls, .xlsx, .ppt, .pptx, .jpg, .jpeg, .png, .gif, .pdf</li>
<li>Press send</li>
<li>Press Press Upload to see the error</li>
<li>Comment line 34 "List<FileInfo> all_files = await Uploader.GetFilesDataAsync();" and restart the application. Then follow those steps again.</li>
</ol>
<SfUploader @ref="Uploader" AutoUpload="false" AllowedExtensions=".doc, .docx, .xls, .xlsx, .ppt, .pptx, .jpg, .jpeg, .png, .gif, .pdf" MaxFileSize=52428800>
</SfUploader>
<div class="form-row botones">
<div class="form-group float-right">
<button type="submit" class="btn btn-primary">Send</button>
</div>
</div>
</EditForm>
@code {
SfUploader Uploader;
ExampleModelDTO example_model = new ExampleModelDTO();
private async Task Sending()
{
//List<FileInfo> all_files = await Uploader.GetFilesDataAsync();
return;
}
public class ExampleModelDTO
{
public string Name { get; set; }
}
Project attached
Attachment:
DemoUploadFailed_d24d3fba.zip