-
Notifications
You must be signed in to change notification settings - Fork 209
pause/resume/cancel upload #1249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @huluyige, thanks for bring this to our attention. Please take a look at https://github.com/aws-amplify/amplify-ios/blob/main/AmplifyPlugins/Storage/AWSS3StoragePluginFunctionalTests/ResumabilityTests/AWSS3StoragePluginGetDataResumabilityTests.swift and let us know if this works for you. let operation = Amplify.Storage.downloadData(
key: key,
options: nil,
progressListener: { progress in
// progress.fractionCompleted
}, resultListener: { result in
switch result {
case .success:
print("Success")
case .failure(let error):
print("Failed with \(error)")
}
})
// pause / resume / cancel
operation.pause()
operation.resume()
operation.cancel() We'll take a follow up to improve the documentation at https://docs.amplify.aws/lib/storage/upload/q/platform/ios |
related doc improvements aws-amplify/docs#3290 |
Hello @lawmicha thank you for reply. Is there a doc talking about resuming after app restart ? like something amplify.getTasks |
Hi @huluyige, Amplify doesn't currently support resuming background tasks after app restart. You can see a discussion here and the associated feature request. |
This issue is being automatically closed due to inactivity. If you believe it was closed by mistake, provide an update and re-open it. |
Describe the bug
I can't find docs about pause/resume/cancel uploads
Hello I'am studying the storage plugin to test if i can pause/resume uploads like the old sdk, unfortunately I didn't find it. I just find a simple method:
Could you please make it clear if the amplify sdk allows to do these? if yes, Could you provide some samples "?
Thank you !
The text was updated successfully, but these errors were encountered: