code: def upload(self):
          
          self.blockStatus = []
          if config.get_default('default_zone').up_host:
              host = config.get_default('default_zone').up_host
          else:
              host = config.get_default('default_zone').get_up_host_by_token(self.up_token)
          offset = self.recovery_from_record()
          for block in _file_iter(self.input_stream, config._BLOCK_SIZE, offset):
              length = len(block)
              crc = crc32(block)
              ret, info = self.make_block(block, length, host)
              if ret is None and not info.need_retry():
                  return ret, info
              if info.connect_failed():
                  if config.get_default('default_zone').up_host_backup:
                      host = config.get_default('default_zone').up_host_backup
                  else:
                      host = config.get_default('default_zone').get_up_host_backup_by_token(self.up_token)
              if info.need_retry() or crc != ret['crc32']:
                  ret, info = self.make_block(block, length, host)
                  if ret is None or crc != ret['crc32']:
                      return ret, info
              self.blockStatus.append(ret)
              offset += length
              self.record_upload_progress(offset)
              if (callable(self.progress_handler)):
                  self.progress_handler(((len(self.blockStatus) - 1) * config._BLOCK_SIZE) + length, self.size)
          return self.make_file(host)
docs: 上传操作