Hosted Blazor WASM WebRootPath is null

Viewed 75

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?

0 Answers
Related