def is_file_like(v):
    """
    Return True if this object is file-like or is a tuple in a format
    that the requests library would accept for uploading.
    """
    return hasattr(v, 'read') or isinstance(v, tuple) and len(v
        ) >= 2 and hasattr(v[1], 'read')
