Last post Jan 05, 2021 03:55 PM by bruce (sqlwork.com)
Jan 05, 2021 10:04 AM|leSyndrome|LINK
I am following
this guide to make an upload file component, but the compiler does not recognize the InputFile component.
If I add @onchange to the markup element the compiler recognizes the component, but I still cannot use InputFileChangeEventArgs in the onchange method, which renders the element useless since I cant access the file that was uploaded. Same thing when using <input
I have "Microsoft.AspNetCore.Components.Forms" included in my _Imports.cshtml and other components from this library work fine.
I am guessing that the assembly reference is wrong but I don't know how to check or fix it.
I tried installing the "Microsoft.AspNetCore.Components.Forms v5.0.1" NuGet package hoping that it will fix all required references, but I get an error that it is not compatible with netcoreapp3.1, which is what I am using.
Any info or useful links will be much appreciated. Thanks!
Sorry if this is not the right place to ask such questions, its my first time here. If you know any better place to post this feel free to share it :)
Jan 05, 2021 03:55 PM|bruce (sqlwork.com)|LINK
You need to upgrade to .net 5 to get builtin file support in blazor.