Background Upload With Stream Request Using NSUrlSession in iOS8

后端 未结 2 1773
滥情空心
滥情空心 2021-01-16 10:21

Previously in iOS7 when we try to upload with stream request in background we get following exception

Terminating app due to uncaught exception \'NSGenericEx

相关标签:
2条回答
  • 2021-01-16 10:28

    You can't upload streamed tasks using Background Configuration. I successfully upload data only in two cases:

    1. Download task with data stored in request body.
    2. Upload task from file. In that case you will not receive response body.
    0 讨论(0)
  • 2021-01-16 10:36

    You can upload a multipart file in background - just that this is not straight forward. Refer: AFNetworking error in uploadTaskWithStreamedRequest

    0 讨论(0)
提交回复
热议问题