小编chi*_*ara的帖子

在AWS S3上停止/取消上传

我正在使用AWSLocal内容上传方法上传文件.我需要取消从其他屏幕上传.

这是上传功能:

private func uploadLocalContent(localContent: AWSLocalContent) {
    localContent.uploadWithPinOnCompletion(false, progressBlock: {[weak self](content: AWSLocalContent?, progress: NSProgress?) -> Void in
        guard let strongSelf = self else { return }
        dispatch_async(dispatch_get_main_queue()) {
            // Update the upload UI if it is a new upload and the table is not yet updated
            if(strongSelf.tableView.numberOfRowsInSection(0) == 0 || strongSelf.tableView.numberOfRowsInSection(0) < strongSelf.manager.uploadingContents.count) {
                strongSelf.updateUploadUI()
            } else {

                for uploadContent in strongSelf.manager.uploadingContents {
                    if uploadContent.key == content?.key {
                        let index = strongSelf.manager.uploadingContents.indexOf(uploadContent)!
                        let indexPath = NSIndexPath(forRow: index, inSection: …
Run Code Online (Sandbox Code Playgroud)

iphone amazon-s3 ios swift

12
推荐指数
1
解决办法
917
查看次数

标签 统计

amazon-s3 ×1

ios ×1

iphone ×1

swift ×1