This project has moved and is read-only. For the latest updates, please go here.

Using StaticFiles and DefaultFiles?

Nov 12, 2013 at 6:56 PM
Could someone please enlighten me on using StaticFiles and DefaultFiles together? Am successfully serving StaticFiles without any issues. Trying to understand how DefaultFiles fits into the pipeline to server Default.html etc when my selfhost starts.

Many thanks,

Nov 12, 2013 at 10:20 PM
DefaultFilesMiddleware should run before StaticFiles. Its only function is to check if any of the default files exist in the given directory. If it finds one it changes the request URL to include the name of the default file, then StaticFiles serves it normally.
Nov 12, 2013 at 10:28 PM
Perfect, worked first time. Really enjoying my journey of discovery with Katana, just find myself struggling at times with the orchestration of the components. Looking forward to more documentation and samples appearing over time.

Really appreciate your quick reply and consideration.

Many thanks,

Marked as answer by PaintedLight on 11/12/2013 at 2:29 PM