def _save_upload_state_to_file(self):
if os.access(self.file_dir, os.W_OK | os.R_OK | os.X_OK):<EOL><INDENT>save_file = self.file + '<STR_LIT>'<EOL>data = {<EOL>'<STR_LIT>': self.upload_token,<EOL>'<STR_LIT>': self.upload_server_ip<EOL>}<EOL>with open(save_file, '<STR_LIT:w>') as f:<EOL><INDENT>json.dump(data, f)<EOL><DEDENT><DEDENT>
if create and create_file has execute, save upload state
        to file for next resume upload if current upload process is
        interrupted.