func startTransferRequest()

in FBSDKGamingServicesKit/FBSDKGamingServicesKit/Internal/VideoUploader.swift [241:278]


  func startTransferRequest(withNewOffset offsetDictionary: [String: Any], data: Data) {
    let dataAttachment = GraphRequestDataAttachment(
      data: data,
      filename: videoName,
      contentType: ""
    )

    var parameters: [String: Any] = [
      Keys.videoUploadPhase: Keys.videoUploadPhaseTransfer,
      Keys.videoFileChunk: dataAttachment,
    ]

    if let startOffset = offsetDictionary[Keys.videoStartOffset] {
      parameters[Keys.videoStartOffset] = startOffset
    }

    if let uploadSessionID = uploadSessionID {
      parameters[Keys.videoUploadSessionID] = uploadSessionID
    }

    let request = graphRequestFactory.createGraphRequest(
      withGraphPath: graphPath,
      parameters: parameters,
      httpMethod: .post
    )
    request.start { _, _, innerError in
      if let innerError = innerError {
        self.delegate?.videoUploader(self, didFailWithError: innerError)
        return
      }

      guard let innerOffsetDictionary = self.extractOffsets(fromResultDictionary: offsetDictionary) else {
        return
      }

      self.startTransferRequest(withOffsetDictionary: innerOffsetDictionary)
    }
  }