Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
For serving images,js and css in asp.net core MVC application ,I use app.UseStaticFiles method and serve from a physical location.

C#
app.UseStaticFiles(new StaticFileOptions()
                {
                    FileProvider = new PhysicalFileProvider("c://staticfiles"),
                    RequestPath = new PathString("/cdn"),
                    ServeUnknownFileTypes=true
                });


but now I want to use Azure Blob storage containers to serve those file . I add Azure.Storage.Blobs nuget package in my application but did not found any FileProvider class for Azure Blob Storage .

How do I do this?

Thanks.

What I have tried:

C#
app.UseStaticFiles(new StaticFileOptions()
                {
                    FileProvider = new PhysicalFileProvider("c://staticfiles"),
                    RequestPath = new PathString("/cdn"),
                    ServeUnknownFileTypes=true
                });
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900