Fix bug with handling mimetypes for static media