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!>
Thanks for joining our community and helping improve Syncfusion products!
Created event not get triggered while rendering the Uploader component.
|
@using Syncfusion.Blazor.Inputs @using System.IO <SfUploader ID="UploadFiles"> <UploaderEvents Created="onCreate" ValueChange="OnChange"></UploaderEvents> @*<UploaderAsyncSettings SaveUrl=https://aspnetmvc.syncfusion.com/services/api/uploadbox/Save RemoveUrl=https://aspnetmvc.syncfusion.com/services/api/uploadbox/Remove></UploaderAsyncSettings>*@ </SfUploader> @code { public void onCreate() { } private void OnChange(UploadChangeEventArgs args) { foreach (var file in args.Files) { var path = @"path" + file.FileInfo.Name; FileStream filestream = new FileStream(path, FileMode.Create, FileAccess.Write); file.Stream.WriteTo(filestream); filestream.Close(); file.Stream.Close(); } } } |