Open Torreslol opened 3 years ago
上传图片的时候 uploadProgress 只回调了上传结束的那一次
request.uploadProgress = { [weak self] bytes, totalBytes, totalBytesExpected in } let task = client.putObject(request) let cancellation = OSSCancellationToken() cancellation.registerCancellationObserver { completion?(.failure(.canceled)) } var url = String.empty if let t = token, let res = client.presignPublicURL(withBucketName: t.bucket, withObjectKey: uploadKey).result as? String { url = res } task.continue(with: OSSExecutor.init(dispatchQueue: self.uploadQueue), block: { task in completion?(.failure(.underlying(error: error))) }, cancellationToken: cancellation)
你上传的文件多大,看下OSSNetworking里NSURLSession 进度的代理方法也执行一次吗
20k, 看了下 这里也只回调了一次
@gerald8 上传个大点试试
@wushuai1415 我也遇到这个问题了,安卓是没问题的
上传图片的时候 uploadProgress 只回调了上传结束的那一次