fix deprecation warning for mimetype