I am using NSURLSession
for uploading a file with background transfer service, but after uploading few bytes. NSURLSession
starts upload again, Don't know exactly why NSURLSession
restart and send the same bytes to the server which are already uploaded.
Asked
Active
Viewed 118 times
1
-
You might check for either redirect or authentication challenge. – Rob Jan 12 '15 at 08:19
-
we have multiple nsurlsession instance with multiple files. But this problem is happening with few instance only. Others are uploading successfully. – nitish Jan 12 '15 at 08:23
-
I also encounter the same problem when the upload file size is large. I guess there is something breaking with the server when a large file is sent. Check the maximum upload file size limit the server has. __Upload and download tasks in background sessions are automatically retried by the URL loading system after network errors. It is unnecessary to use reachability APIs to determine when to retry a failed task.__ Source: [URL Session Programming guide](https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/URLLoadingSystem/Articles/UsingNSURLSession.html) – Utsav Dusad Mar 22 '16 at 08:07