UploadOperation
public protocol UploadOperation : NetworkOperation
A network operation that knows how to execute an upload to pCloud.
-
The result from executing the upload. Exists only when
stateisNetworkOperationState.completed.Declaration
Swift
var response: Upload.Response? { get } -
The number of bytes currently uploaded.
Declaration
Swift
var numberOfBytesSent: Int64 { get } -
The total number of bytes to upload.
Declaration
Swift
var totalNumberOfBytesToSend: Int64 { get } -
Adds a block to be called on a specific queue when
numberOfBytesSentchanges.Declaration
Swift
@discardableResult func addProgressBlock(with queue: DispatchQueue?, _ block: @escaping (Int64, Int64) -> Void) -> SelfParameters
queueA queue to call
blockon. Ifnil, the queue on whichblockwill be called is undefined.blockA block called with the number of bytes currently uploaded and the total number of bytes to upload as first and second input arguments respectivly. Referenced strongly by the operation.
-
Adds a block to be called on a specific queue when the operation receives its response.
Declaration
Swift
@discardableResult func addCompletionBlock(with queue: DispatchQueue?, _ block: @escaping (Upload.Response) -> Void) -> SelfParameters
queueA queue to call
blockon. Ifnil, the queue on whichblockwill be called is undefined.blockCalled as soon as the operation receives its response. Referenced strongly by the operation.
View on GitHub
UploadOperation Protocol Reference