you can not catch a javascript out of memory error. The user must manually reload the page. You should design the page to not exceed memory. You can check file size before access.
in javascript there is no limit on upload file size, even when using ajax. if you are changing the file to a data url, you need to check the size first.
Member
2 Points
7 Posts
How to intercept errors generated in DotNet.js - Blazor Client Side
Mar 21, 2020 09:20 AM|PiercarloBI|LINK
Hello guys,
I´m getting out of memory error on DotNet.js because I´m trying to upload a too big file.
My question is how I can Catch the error in Blazor Client ?
Thanks for help
All-Star
58164 Points
15647 Posts
Re: How to intercept errors generated in DotNet.js - Blazor Client Side
Mar 23, 2020 04:47 PM|bruce (sqlwork.com)|LINK
you can not catch a javascript out of memory error. The user must manually reload the page. You should design the page to not exceed memory. You can check file size before access.
in javascript there is no limit on upload file size, even when using ajax. if you are changing the file to a data url, you need to check the size first.