def __init__(self, client_id, access_token, file, logger=None):
super(YoukuUpload, self).__init__()<EOL>self.client_id = client_id<EOL>self.access_token = access_token<EOL>self.logger = logger or logging.getLogger(__name__)<EOL>self.file = file<EOL>self.file_size = os.path.getsize(self.file)  <EOL>self.file_dir, self.file_name = os.path.split(self.file)  <EOL>if self.file_dir == '<STR_LIT>':<EOL><INDENT>self.file_dir = '<STR_LIT:.>'<EOL><DEDENT>self.file_ext = self.file_name.rsplit('<STR_LIT:.>', <NUM_LIT:1>)[<NUM_LIT:1>],  <EOL>self.file_md5 = None  <EOL>self.upload_token = None  <EOL>self.upload_server_ip = None  <EOL>self.slice_task_id = None  <EOL>self.slice_offset = None  <EOL>self.slice_length = None  <EOL>self.transferred = None  <EOL>self.finished = False  <EOL>self._read_upload_state_from_file()<EOL>
Args:
    file: string, include path and filename for open(). filename
        must contain video file extension.