Upload component "Open" click event

Hi,

Is there an event that can capture the user-selected file(user click the open button before sending the file to server-side)? I want to implement a logic after the user selects a file before the file is sent to the server-side.
Thank you.

Hi @blu,

You can try disabling automatic uploads (set the Auto property to false) and handle the Change event of the upload. The Change event will fire after the user selects a file. You however need to perform the upload manually by getting a reference to the component and calling its Upload method:

  1. Create a page property with type RadzenUpload and name myUpload
  2. Add a custom attribute with name @ref and value myUpload
  3. To perform the upload use Execute C# action with Code myUpload.Upload()

Hi @korchev
I was confused why the file was automatically uploaded instead of clicking a button.

Your answer solved my two issues.

Thank you so much for your help.