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
sessionConfigurationThe session configuration to use within the upload executer.
downloadExecuterDelegateThe 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
requestThe request to be uploaded.
fromFileThe 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
requestThe request to be uploaded.
fromThe data to be uploaded.
Return Value
The request to be able to cancel if necessary.
View on GitHub
Install in Dash
UploadExecuter Protocol Reference