{"id":19063562,"url":"https://github.com/lurumad/aspnetfileproviders","last_synced_at":"2026-06-21T15:31:00.766Z","repository":{"id":144200234,"uuid":"146295402","full_name":"lurumad/aspnetfileproviders","owner":"lurumad","description":"ASP.NET Core FileProviders","archived":false,"fork":false,"pushed_at":"2018-08-29T16:05:19.000Z","size":33,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-22T02:41:24.852Z","etag":null,"topics":["aspnetcore","aspnetcoremvc","csharp","fileproviders"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lurumad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-27T12:37:31.000Z","updated_at":"2018-08-30T11:35:32.000Z","dependencies_parsed_at":"2025-11-22T14:05:09.910Z","dependency_job_id":null,"html_url":"https://github.com/lurumad/aspnetfileproviders","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/lurumad/aspnetfileproviders","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lurumad%2Faspnetfileproviders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lurumad%2Faspnetfileproviders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lurumad%2Faspnetfileproviders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lurumad%2Faspnetfileproviders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lurumad","download_url":"https://codeload.github.com/lurumad/aspnetfileproviders/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lurumad%2Faspnetfileproviders/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34616509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aspnetcore","aspnetcoremvc","csharp","fileproviders"],"created_at":"2024-11-09T00:37:29.638Z","updated_at":"2026-06-21T15:31:00.739Z","avatar_url":"https://github.com/lurumad.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build status](https://ci.appveyor.com/api/projects/status/74qic5p9f6vvjwdv?svg=true)](https://ci.appveyor.com/project/lurumad/aspnetfileproviders) [![NuGet](https://img.shields.io/nuget/v/Lurumad.AspNet.FileProviders.AzureStorage.svg)](https://www.nuget.org/packages/Lurumad.AspNet.FileProviders.AzureStorage/)\n\n[![Build history](https://buildstats.info/appveyor/chart/lurumad/aspnetfileproviders)](https://ci.appveyor.com/project/lurumad/aspnetfileproviders/history)\n\n# Lurumad.AspNet.FileProviders\n\nA collection of File Providers for ASP.NET Core:\n\n- **Azure Blob Storage File Provider** for ASP.NET Core.\n\n  This file provider allows our ASP.NET Core application to use Azure blobs as if they would actually be files stored in server disk.\n\n  As an example, we could use this provider to make our ASP.NET application serve blobs as static files, based in a relative request path.\n\n  If we would have following blobs inside an Azure Blob Container:\n\n  - Blob1.txt\n\n  - Blob2.txt\n\n  and we'd configure the provider with \"/site\" relative path, we could ask for the blobs using following url's:\n\n      https://server/site/Blob1.txt and https://server/site/Blob2.txt\n\n## Getting Started with Azure Storage File Provider\n\n1. Install the Nuget Package into your ASP.NET Core application.\n\n``` PowerShell\nInstall-Package Lurumad.AspNet.FileProviders.AzureStorage\n```\n\n2. Usage\n\nAn example of using AzureBlobStorageFileProvider with static files and directory browser:\n\n```csharp\npublic class Startup\n{\n    private const string RequestPath = \"/site\";\n    private readonly IConfiguration configuration;\n\n    public Startup(IConfiguration configuration)\n    {\n        this.configuration = configuration;\n    }\n\n    public void ConfigureServices(IServiceCollection services)\n    {\n        services.Configure\u003cAzureOptions\u003e(configuration.GetSection(nameof(AzureOptions)));\n    }\n\n    public void Configure(IApplicationBuilder app, IHostingEnvironment env)\n    {\n        var fileProvider = new AzureBlobStorageFileProvider(configuration.GetSection\u003cAzureOptions\u003e());\n\n        app.UseStaticFiles(new StaticFileOptions\n        {\n            FileProvider = fileProvider,\n            RequestPath = RequestPath\n        })\n        .UseDirectoryBrowser(new DirectoryBrowserOptions\n        {\n            FileProvider = fileProvider,\n            RequestPath = RequestPath\n        });\n    }\n}\n```\n\nMore advanced scenario of using AzureBlobStorageFileProvider with Razor View Engine as a email template system:\n\n```csharp\npublic class Startup\n{\n    private readonly IConfiguration configuration;\n\n    public Startup(IConfiguration configuration)\n    {\n        this.configuration = configuration ?? throw new System.ArgumentNullException(nameof(configuration));\n    }\n\n    public void ConfigureServices(IServiceCollection services)\n    {\n        services\n            .Configure\u003cAzureOptions\u003e(configuration.GetSection(nameof(AzureOptions)))\n            .AddSingleton(configuration.GetSection\u003cAzureOptions\u003e())\n            .AddMvcCore()\n            .AddViews()\n            .AddRazorViewEngine(engine =\u003e\n            {\n                engine.ViewLocationFormats.Clear();\n                engine.ViewLocationFormats.Add($\"{{0}}/{{1}}/{{1}}{RazorViewEngine.ViewExtension}\");\n                engine.ViewLocationFormats.Add($\"Shared/{{0}}{RazorViewEngine.ViewExtension}\");\n                engine.FileProviders.Add(new AzureBlobStorageFileProvider(configuration.GetSection\u003cAzureOptions\u003e()));\n            })\n            .AddJsonFormatters()\n            .AddApiExplorer()\n            .AddFluentValidation(fv =\u003e fv.RegisterValidatorsFromAssemblyContaining\u003cTemplateCreateValidator\u003e())\n            .Services\n            .AddOpenApi()\n            .AddScoped\u003cIViewToStringRenderer, RazorViewToStringRenderer\u003e()\n            .AddScoped\u003cITemplatesRepository, TemplatesRepository\u003e()\n            .AddScoped\u003cITemplatesService, TemplatesService\u003e();\n    }\n\n    public void Configure(IApplicationBuilder app, IHostingEnvironment env)\n    {\n        app\n            .UseAuthentication()\n            .UseOpenApi()\n            .UseMvc();\n    }\n}\n```\n\nYou can play with the samples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flurumad%2Faspnetfileproviders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flurumad%2Faspnetfileproviders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flurumad%2Faspnetfileproviders/lists"}