I am trying to upload a file with RadzenUpload (Client side), but I am always getting the error "Object reference not set to an instance of an object" when I execute:
I have upgraded from Radzen 5.1 to Radzen 5.3 and I still get the error....
Could it be because I am using a Server Blazor project? Should work the same...
I suggest trying one of the following to find the problem:
Start removing components until there is only RadzenUpload or things start working.
Test with the built-in InputFile (which RadzenUpload uses under the hood). It should work however if it too fails there could be some different problem altogether.
Try uploading smaller or different files to see if the situation changes.
I am receiving the exactly same error using the code from the component examples. I have upgraded to the latest 5.3.5. Attempted uploads of different sizes (most images are under 1mb).
Fails on the same "file.OpenReadStream(maxLength)" with the same error.
Even if the Radzen components are awesome, this one was also not working for me... I tried everything like you. I ended up using the InputFile component from Microsoft.AspNetCore.Components.Forms.InputFile.
Thanks for the heads up! Thought I was going crazy! I ended up using the InputFile also for a temp solution to get things working. Was hoping that someone from Radzen may respond with a solution.
Thanks for the code snippet!
We can't reproduce this in our tests. Until we do we can't propose a solution. Tried with our online demos, a new app (server and wasm) - no luck. The code from the demo works without problem. If you need a response from us provide a reproduction.
I am having this same problem. The "source" property of the file, which is supposed to contain the IBrowserFile content and is required for the OpenReadStream method, is NULL. I do not understand why. The file name and size values are populated but the source is NULL. Of course this makes the control unusable.
If any Radzen folks could provide shine some light on a solution to this issue that would be great. I really prefer to use this over a native solution.