code: def upload_file(self, file_name, file_obj, *args, **kwargs):
  		
  		previous_path = self.session_path()
  		try:
  			self.session_path(file_name)
  			with open(self.full_path(), mode='wb') as f:
  				chunk = file_obj.read(io.DEFAULT_BUFFER_SIZE)
  				while len(chunk) > 0:
  					f.write(chunk)
  					chunk = file_obj.read(io.DEFAULT_BUFFER_SIZE)
  		finally:
  			self.session_path(previous_path)
docs: :meth:`.WNetworkClientProto.upload_file` method implementation