You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was fiddling with this sample as my first experience of Blazor-Maui. This is looking super-cool!
I wanted to amend the app to serve images that are generated dynamically within the app (ie not by an external web-service) based on some weather-criteria. How would I go about doing this?
For e.g. imagine a weather image based on some data:
<imgsrc="/img-generator-service?data=576587" />
How would I instantiate a service in the MAUI app that would mimic a webserver serving bytes to localhost?
e.g. to host something like:
publicasyncTask<byte[]>ImgGeneratorService(stringdata);//Or in the asp.net core pattern:[HttpGet("img-generator-service")
public async Task<IActionResult>Get(stringdata);
The text was updated successfully, but these errors were encountered:
Content in blazor desktop and MAUI are served via IFileProvider. You would need to implement this interface to serve your generated content. However, with current release, you will not be able to plug in your implementation. This appears to be fixed but not released yet.
BlazorWebView does not obtain IFileProvider from DI. It instantiates PhysicalFileProvider in a private method. The change that I see now is that they added a virtual method that we can override and return our own implementation to augment the current PhysicalFileProvider. You can see more details here: dotnet/maui@55175b8#diff-0c065d47653e514388503b6e1cb075c67ce6fef6f6f955c9cdc78d51a47e5ecf
Hi @danroth27 ,
I was fiddling with this sample as my first experience of Blazor-Maui. This is looking super-cool!
I wanted to amend the app to serve images that are generated dynamically within the app (ie not by an external web-service) based on some weather-criteria. How would I go about doing this?
For e.g. imagine a weather image based on some data:
How would I instantiate a service in the MAUI app that would mimic a webserver serving bytes to localhost?
e.g. to host something like:
The text was updated successfully, but these errors were encountered: