I'm trying to update a progress view as I upload an asset to an S3 bucket like so:
myTransferManager.upload(myTransferManagerRequest).continueWithExecutor(myDefaultThreadBFExecutor, withBlock: { (myBFTask) -> AnyObject! in ... etc etc.
However, I can't figure out how to get the completion percentage of the request as it uploads. I have come across this delegate method a few times:
-(void)request:(AmazonServiceRequest *)request didSendData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite: (NSInteger)totalBytesExpectedToWrite
{
}
But my project is written in Swift and I haven't been able to figure out how to implement this. For reference, I came across that method here: http://ift.tt/1xSuFm2 and here: Uploading to Amazon-S3 via AFNetworking
any tips would be greatly appreciated!
Cheers, Brendan
Aucun commentaire:
Enregistrer un commentaire