This project has moved. For the latest updates, please go here.

Using StaticFiles and DefaultFiles?

Nov 12, 2013 at 5: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,

Shaun
Coordinator
Nov 12, 2013 at 9: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 9: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,

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