Hi,
I am currently using File Manager v. 19.1.0.58. What I wanted to do was to detect a successful file upload operation. I was planning on achieving this using FileManagerEvents with the OnSuccess property. Here's the code that is in question.
<SfFileManager TValue="FileManagerDirectoryContent">
<FileManagerEvents TValue="FileManagerDirectoryContent" OnSuccess="OnSuccess"></FileManagerEvents>
<FileManagerAjaxSettings Url="/api/FileManager/FileOperations"
DownloadUrl="/api/FileManager/Download"
UploadUrl="/api/FileManager/Upload">
</FileManagerAjaxSettings>
</SfFileManager>
@code {
public async Task OnSuccess(SuccessEventArgs<FileManagerDirectoryContent> e)
{
if (e.Action == "upload")
await JSRuntime.InvokeVoidAsync("alertSuccessfulUpload", null);
else if (e.Action == "delete")
await JSRuntime.InvokeVoidAsync("alertSuccessfulDeletion", null);
}
}
Upon uploading a file, the e.Action property will return a value of "read" even when the file has just been uploaded. This also happens with a delete event. The Action property will also return a "read" value.
Please advise on what needs to be done in order for us to detect a successful upload or delete event.
Thanks!