Skip to content

Latest commit

 

History

History
 
 

File Provider (10)

  • Serve static files

    Simply serve static files (html, css, images, etc).

    There are two static files being served in this project, index.html and hello.css. They are stored under wwwroot folder, which is the default folder location for this library.

    To access them you have to refer them directly e.g. localhost:5000/index.html and localhost:5000/hello.css.

  • Allow Directory Browsing

    Allow listing and browsing of your wwwroot folder.

  • Use File Server

    Combines the functionality of UseStaticFiles, UseDefaultFiles, and UseDirectoryBrowser.

  • Custom Directory Formatter

    Customize the way Directory Browsing is displayed. In this sample the custom view only handles flat directory. We will deal with more complex scenario in the next sample.

  • Custom Directory Formatter - 2

    Show custom Directory Browsing and handle directory listing as well as files.

  • Allow Directory Browsing

    Use Directory Browsing on a certain path using DirectoryBrowserOptions.RequestPath, e.g. /browse.

  • Serve Static Files from more than one folders

    This example shows how to serve static files from multiple directories (even outside your application path).

  • Physical File Provider - Content and Web roots

    Access the file information on your Web and Content roots.

  • Custom File Provider

    Implement a simple and largely nonsense file provider. It is a good starting point to implement your own proper File Provider.

  • Log Static File Servings

    Log information about the static file being served.

dotnet8