Fix DeprecationWarning about mimetype keyword