Hi.
I'm using 18.4.0.42 on .Net core 3.1.
I've created a filemanager with this simple code:
<SfFileManager TValue="FileManagerDirectoryContent">
<FileManagerEvents TValue="FileManagerDirectoryContent" OnSend="send" OnSuccess="OnSuccess"></FileManagerEvents>
<FileManagerAjaxSettings Url="/api/Home/FileOperations"
UploadUrl="/api/Home/Upload"
DownloadUrl="/api/Home/Download"
GetImageUrl="/api/Home/GetImage">
</FileManagerAjaxSettings>
</SfFileManager>
@code{
public void send(Syncfusion.Blazor.FileManager.BeforeSendEventArgs e)
{
e.CustomData = new Dictionary<string, object>();
e.CustomData.Add("FilePath", "syncfusion");
}
public void OnSuccess(Syncfusion.Blazor.FileManager.SuccessEventArgs<FileManagerDirectoryContent> e)
{
if (e.Action != "read")
{
int a = 2;
}
}
The issue I'm having is that, every time I upload a file, the OnSuccess event is triggered, but e.Action equals "read", and never "upload".
If a delete a file, it correctly calls that method twice: once with e.Action="delete" and then with e.Action="read".
To reproduce this, simply use this code and set a breakpoint in that line to see the E.action value.
On a previous version of Syncfusion this was working (18.3.0.44) : e.Action had a value of "upload" after a successful upload.
Is this a bug, or was the behaviour changed? If so, how can I perform an action only after a successful upload?
Thank you for your support.