def __init__(self, requester, url, file, **kwargs):
if isinstance(file, string_types):<EOL><INDENT>if not os.path.exists(file):<EOL><INDENT>raise IOError('<STR_LIT>' + file + '<STR_LIT>')<EOL><DEDENT>self._using_filename = True<EOL><DEDENT>else:<EOL><INDENT>self._using_filename = False<EOL><DEDENT>self._requester = requester<EOL>self.url = url<EOL>self.file = file<EOL>self.kwargs = kwargs<EOL>
:param requester: The :class:`canvasapi.requester.Requester` to pass requests through.
:type requester: :class:`canvasapi.requester.Requester`
:param url: The URL to upload the file to.
:type url: str
:param file: A file handler or path of the file to upload.
:type file: file or str