UploadExecuter

public protocol UploadExecuter : AnyObject

The protocol an upload executer has to conform to to be used to upload.

  • The delegate to set to receive updates on uploads.

    Declaration

    Swift

    var delegate: UploadExecuterDelegate? { get }
  • The session configuration to use to upload.

    Declaration

    Swift

    var sessionConfiguration: URLSessionConfiguration { get }
  • # Summary Initialises an upload executer to upload.

    Declaration

    Swift

    init(sessionConfiguration: URLSessionConfiguration, uploadExecuterDelegate: UploadExecuterDelegate)

    Parameters

    sessionConfiguration

    The session configuration to use within the upload executer.

    downloadExecuterDelegate

    The delegate to send the upload updates to.

  • # Summary Uploading the given request and file.

    Declaration

    Swift

    func upload(request: URLRequest, fromFile fileURL: URL) -> CancellableRequest?

    Parameters

    request

    The request to be uploaded.

    fromFile

    The file to be uploaded.

    Return Value

    The request to be able to cancel if necessary.

  • # Summary Uploading the given request and data.

    Declaration

    Swift

    func upload(request: URLRequest, from bodyData: Data) -> CancellableRequest?

    Parameters

    request

    The request to be uploaded.

    from

    The data to be uploaded.

    Return Value

    The request to be able to cancel if necessary.