Upload picture move and replace to defaut filename (with directory)

Hi team,

I just found this forum regarding uploading of picture..

https://www.syncfusion.com/forums/175566/upload-image-in-grid

My requirement is to upload, copy and replace the current file.

However, there is no Property in FileSelected in Syncfusion.Blazor.Inputs.FileInfo class to get the full path of the source file so I can apply this.

string SourcePath = @"c:\SoureFile.txt"; // this should be derived from FileSelected in Syncfusion.Blazor.Inputs.FileInfo string DestinationPath = "scripts/Images/Employees/"+Itemcode;

FileInfo fi1 = new FileInfo(Path);

fi1.CopyTo(path2);


Hope could help me on this matter,


Best Regards,


Tyrone



1 Reply

KG Keerthana Ganesan Syncfusion Team November 7, 2022 03:02 AM UTC

Hi Denis,

Query: Upload picture move and replace to the default filename

We suspect that the reported issue occurred because SfUploader has multiple property set to false, which is used to replace the existing file. After analyzing your code, you got the file name alone using the uploader component’s select event.

Regards,
Keerthana.


Loader.
Up arrow icon