I'm usually not a front end guy, so maybe this is a stupid question, but I'm stumped.
I'm working on dealing with file uploads in a hosted Blazor WASM app. WebRootPath is null in the controller, which sort of makes sense to me since the wwwroot folder is on the client.
Ok, since I know that when I publish the wwwroot folder will be available one level up from the ContentRootPath, I can get to it in production. But, how do I get to it in development? And what is the best way to make uploads work in development and production?
Basically, how do I access the client project's wwwroot folder in both enviornments?
There`s a very hacky way of getting the wwwroot path in development
I must also warn you that i did not properly tested this method on multiple platforms, so it may not work for you.