I'm trying to write an audio file into a .NET MAUI Blazor on Windows, so I can play it via HTML Audio Element via https://0.0.0.0/... or such link.
How can I get the application local storage path that I can write to, which points to that url?
I'm trying to write an audio file into a .NET MAUI Blazor on Windows, so I can play it via HTML Audio Element via https://0.0.0.0/... or such link.
How can I get the application local storage path that I can write to, which points to that url?
Here is the answer: .NET MAUI Documentation about Storage
You can use AppDataDirectory static property of the FileSystem class:
string path = FileSystem.AppDataDirectory;
Gets the location where app data can be stored.