-
Notifications
You must be signed in to change notification settings - Fork 210
Does Amplify.Storage support background upload? #1096
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 @yusuftor, thanks for the link. It is possible because the storage plugin is implemented using TransferUtility, so if you perform an Amplify.Storage.upload/download, and background the app, the operation will continue to operate since it is using TransferUtility internally. This implementation detail is subject to change, which is why it is not documented as we have not explicited designed the storage plugin to do so. There aren't any supporting APIs for background transfers on the storage plugin such as to store the application's handleEventsForBackgroundURLSession completion handler and wake the app when the transfer is completed, or allowing the developer to manage a transfer when a suspended app returns to the foreground. The capability to fully manage transfers is limited. With the exception of the functionality mentioned, does this support your use case? if not, could you expand on what you are trying to do? |
Thanks for the quick reply @lawmicha. Is it possible to get hold of the underlying TransferUtility singleton from the Amplify instance? Actually I was wanting to use the handleEventsForBackgroundURLSession, and I thought maybe I could pass it to Amplify's singleton of TransferUtility. |
Hi @yusuftor, technically it is possible by using the same key to reference the TransferUtility singleton that Amplify.Storage internally uses, but I don't think that is a robust way, another option would be to directly use TransferUtility if that functionality is a strong requirment for you. we have a feature request over here #1102 that is related this |
This issue is being automatically closed due to inactivity. If you believe it was closed by mistake, provide an update and re-open it. |
I know that TransferUtility supports background upload. However, it doesn't mention this functionality anywhere in the Amplify docs for Storage upload. Can someone confirm whether this is or isn't possible, and if so how?
The text was updated successfully, but these errors were encountered: