OnSuccess event action parameter has wrong value after performing an upload.

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.




1 Reply 1 reply marked as answer

SS Sharon Sanchez Selvaraj Syncfusion Team February 23, 2021 01:09 PM UTC

Hi Luca, 

Thanks for contacting Syncfusion Support. 

We were able to reproduce the issue and considered this as a bug from our end. 

The fix for this issue will be available in the second weekly patch release after Volume 1, 2021 release which is expected to be rolled out by the end of March, 2021. 

Please track the following feedback link to know the status of this issue. 


Please check with the below links to know more about FileManager component. 




Please get back to us if you need any further assistance. 

Regards, 

Sharon Sanchez S. 
 


Marked as answer
Loader.
Up arrow icon