IsFile check.
Use middleware.
Introduce doc class.
Merge branch 'feature/middleware' into develop
Middleware example.