Is it possible to use the fileupload component to save files in a ftp server ?
I'm using this approach but it doesn't work.
I don't receive any error but the file is not saved even if I have permissions to create files on the NAS where an ftp server is running
<SfUploader AutoUpload="true" Multiple=false>
<UploaderEvents ValueChange="OnChange"></UploaderEvents>
</SfUploader>
@code {
private void OnChange(UploadChangeEventArgs args)
{
foreach (var file in args.Files)
{
var path = @"ftp://username:password@<NAS address>" + file.FileInfo.Name;
FileStream filestream = new FileStream(path, FileMode.Create, FileAccess.Write);
file.Stream.WriteTo(filestream);
filestream.Close();
file.Stream.Close();
}
}
}