我试图使用新的ios7后台传输api将一些照片上传到服务器。它现在发生的是 1)我们将字节上传到s3 2)调用服务api来完成上传
I was trying to use the new ios7 background transfer api to upload some photos to a server. what it happened now is 1) we upload the bytes to s3 2) call a service api to 'complete' the upload
我看了在这个文档和似乎背景NSURLSession不支持'数据'任务。这是否意味着我在实际上传完成后无法在后台执行第2步?
i looked at this doc and it seems background NSURLSession doesn't support 'data' task. does that mean i can't do the step 2 in background after the actual upload is done?
推荐答案如果你想要更简单解决方案,而不是重新利用 NSURLSessionDownloadTask 进行已完成的API调用,您可以在回调期间快速进行快速http调用:
If you want a simpler solution than repurposing NSURLSessionDownloadTask for your "completed" API call, you can round trip a quick http call during the callback in:
-URLSession:task:didCompleteWithError:
更多推荐
NSURLSession:后台上传然后调用服务api
发布评论