Welcome to the Blazor feedback portal. We’re happy you’re here! If you have feedback on how to improve the Blazor, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

Requirement: After uploaded the file, need to clear the list using clearAll method and then reload it from their API.

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Blazor_upload-1661538746

Replication procedure:

1. Run the above sample.

2. Upload any file.

3. Actual: The file get cleared, but not updated again using files property

<SfUploader @ref="UploaderObj" ID="UploadFiles" DropArea="#dropArea" MinFileSize="100" MaxFileSize="1000000" Files="@UploaderFiles">

   <UploaderEvents ValueChange="OnChangeAsync"></UploaderEvents>

   <UploaderTemplates>

       <Template>

          <span class="wrapper">

          <img class="upload-image" alt="Image">

          </span>

          <div class="name file-name graytext" title="@((context as FileInfo).Name)">@((context as FileInfo).Name)</div>

         <div class="file-size">@(context.Size)</div>

          <span class="e-icons e-file-remove-btn remove" id="removeIcon" title="Remove"></span>

       </Template>

    </UploaderTemplates>

</SfUploader>


@code

{

    public List<UploaderUploadedFiles> UploaderFiles { get; set; }

    public SfUploader UploaderObj { get; set; }


    public async Task OnChangeAsync(UploadChangeEventArgs args)

    {

      UploaderObj.ClearAll();

      UploaderFiles = new List<UploaderUploadedFiles>() { new UploaderUploadedFiles() { Name = "tata", Size = 100, Type = ".png" } };

    }

}