Contents

uploadTask(withResumeData:completionHandler:)

Creates a URLSessionUploadTask from a resume data blob. If resuming from an upload file, the file must still exist and be unmodified.

Declaration

func uploadTask(withResumeData resumeData: Data, completionHandler: @escaping  @Sendable (Data?, URLResponse?, (any Error)?) -> Void) -> URLSessionUploadTask

Parameters

  • resumeData:

    Resume data blob from an incomplete upload, such as data returned by the cancelByProducingResumeData: method.

  • completionHandler:

    The completion handler to call when the load request is complete.

Return Value

A new session upload task, or nil if the resumeData is invalid.

See Also

Adding upload tasks to a session