BlazorInputFile
BlazorInputFile copied to clipboard
Could not find 'BlazorInputFile' in 'window'
For some reason, my server side blazor app no longer works with the BlazorInputFile package. When i attempt to upload a file using this, my chrome dev console is throwing an error.
[2020-03-18T20:31:14.001Z] Error: Microsoft.JSInterop.JSException: Could not find 'BlazorInputFile' in 'window'.
Error: Could not find 'BlazorInputFile' in 'window'.
at https://localhost/_framework/blazor.server.js:8:30748
at Array.forEach (
I have tried uninstalling and reinstalling the package, clearing nuget cache, rebuilding the project, all with no luck. I am not sure where to look..
Does the browser dev tools show an error that the inputfile.js couldn't be loaded? If so you probably need to add app.UseStaticFiles();
(with no arguments) in your Configure(IApplicationBuilder app)
method in your Startup
class. This is because UseStaticFiles also hosts static files from packages.