Jaguar-dart / jaguar

Jaguar, a server framework built for speed, simplicity and extensible. ORM, Session, Authentication & Authorization, OAuth
http://jaguar-dart.github.io
463 stars 34 forks source link

Static file custom extensions #137

Closed rspilker closed 3 years ago

rspilker commented 4 years ago

This allows users of staticFiles to provide functions to determine the mimetype of the file, allowing:

  1. Serving mimetypes that are not in the pre-build list
  2. Determine the mimetype based on the contents of a file.

The first is currently possible using after, the second isn't.

Beware: this pull request is based on top of #136, so pulling this in automatically pulls in #136.

It is not based in #135 or #134.

tejainece commented 3 years ago

Thanks for the PR and the awesome feature. This is now merged and published to pub.dev as version 3.0.9.