'Called in the EnvironBuilder to add files from the data dict.'

def _add_file_from_data(self, key, value):

    if isinstance(value, tuple):
        self.files.add_file(key, *value)
    elif isinstance(value, dict):
        from warnings import warn
        warn(DeprecationWarning("it's    no    longer    possible    to    pass    dicts    as    `data`.        Use    tuples    or    FileStorage    objects    instead"), stacklevel=2)
        value = dict(value)
        mimetype = value.pop('mimetype', None)
        if (mimetype is not None):
            value['content_type'] = mimetype
        self.files.add_file(key, **value)
    else:
        self.files.add_file(key, value)
