Use content_type keyword argument instead of the deprecated mimetype