RadzenFileInput close button freeze application

Hi,
When I try to save or edit image(in this case my photo) into MSSQLSERVER database and click CLOSE BUTTON, application freeze without any error messages.
Application works if SAVE BUTTON is clicked first.

        <RadzenFormField>
          <ChildContent>
            <RadzenFileInput @bind-FileName=@fileName @bind-FileSize=@fileSize TValue="string" class="w-100"
              Change=@(args => OnChange(args, fileName)) Error=@(args => OnError(args, fileName)) />
          @code 
          {
          EventConsole console;
          public string fileName;
          long? fileSize;
          static string base64EncodedImageData;

          void OnChange(string value, string name)
          {
            fileName = $"{name}";

            // Convert Base64 String to byte[]

            string[] dbInfo = value.Split("base64,");
            base64EncodedImageData = dbInfo[1].ToString();

            byte[] imageBytes = Convert.FromBase64String(base64EncodedImageData);

            application.Photo = imageBytes;
            application.Image = name;
          }
          void OnError(UploadErrorEventArgs args, string name)
          {
            console.Log($"{args.Message}");
          }
          }
          </ChildContent>
        </RadzenFormField>

Check your browser console for unhandled exceptions.

Hi,
Thanks' for advice!
The problem was that after CLOSE BUTTON clicked the value parameter was initialize( was to be expected).
Correct code is :smile: smile:
@code
{
public string fileName;
long? fileSize;
static string base64EncodedImageData;

            void OnChange(string value, string name)
            {
                fileName = $"{name}";

                if (value != null)
                {
                    // Convert Base64 String to byte[]
                    string[] dbInfo = value.Split("base64,");
                    base64EncodedImageData = dbInfo[1].ToString();
                    byte[] imageBytes = Convert.FromBase64String(base64EncodedImageData);
                    application.Photo = imageBytes;
                    application.Image = name;
                }
            }

            void OnError(UploadErrorEventArgs args, string name)
            {
                string err = $"{args.Message}";
            }
        }