Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Upload stops when phone goes to sleep and not resuming #89

Open
boazin opened this issue Apr 22, 2015 · 0 comments
Open

Upload stops when phone goes to sleep and not resuming #89

boazin opened this issue Apr 22, 2015 · 0 comments

Comments

@boazin
Copy link

boazin commented Apr 22, 2015

First of all awesome library.

I have an issue, I'm uploading a file with the following code:

[s3Manager putObjectWithFile:videoPath
                         destinationPath:destinationPath
                              parameters:nil
                                progress:^(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) {
                                    float fraction = (totalBytesWritten / (totalBytesExpectedToWrite * 1.0f));
                                    NSLog(@"%f Uploaded", fraction);
                                }
                                 success:^(AFAmazonS3ResponseObject *responseObject) {
                                     //success - do syuff


                                 }

                                 failure:^(NSError *error) {
                                     NSLog(@"Error: %@", error);
                                     return;
                                 }];
        }];

Now the upload takes a long time (a video file), and the app can get into background mode.
When I look at the phone log, after the screen turns off - the % uploaded is getting updated for another 30 seconds or so and then just hangs.
When I get the app back to foreground - it is just stuck... Upload isn't continuing and no error indication.

How can I solve this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant