Skip to content

Can we get using MapStaticAssets available instead of UseStaticFiles?Β #985

@DevTKSS

Description

@DevTKSS

What would you like to be added? πŸ’‘

  • I would like to have the enhancements for Asset handling on WebAssembly Served on a Asp Net core Project thats using the Uno.Wasm.Bootstrapper.Server Package thats src code for the AspNetCoreExtensions is located in this Repository, if possible

  • Are there limits of what functions we can or should NOT use in projects that including this package? Like for file/Asset management at the moment uno uses UseStaticFiles internally, what about the builder.Services.AddDirectoryBrowser(); ?

Why is this needed? πŸ€”

Using MapStaticAssets could be a good enhancement reading the asp net core docs page here: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/map-static-files?view=aspnetcore-9.0
since uno is using brotli for webassemly for example also.

I was not able to find a Recommendation or advise for how to work with assets in using this package if there are some, only this Uno.Wasm.Bootstrapper Package specific docs: https://platform.uno/docs/articles/external/uno.wasm.bootstrap/doc/features-additional-files.html but I would assume, as those are seperate packages, this can not be asumed to apply on the Server Package also.

Renderer 🎨

  • Skia
  • Native

For which platforms πŸ“±πŸ’»πŸ–₯️

WebAssembly served on the provided Server Project while the Server Project would be the startup one

Anything else we need to know? πŸ’¬

Maybe someone is able to tell about this. Would be interesting to know, even if we can not get this, if or what advises you may have for working with files specifically when using this package.

seems like uno is using a "WebRootProvider" for this, maybe that can help with this task?

var webHostEnvironment = builder.ApplicationServices.GetRequiredService<IWebHostEnvironment>();
var options = CreateStaticFilesOptions(webHostEnvironment.WebRootFileProvider);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions