Issue 18 - Adding Upload Completion Handler for Handling Custom/Error… #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduction
There is no code in the library to handle the response received after uploading a file. The response is simply discarded. This might acceptable for some uploads, but if you're expecting a custom response or error that you need to react to after an upload attempt then you need to capture the response and provide it to the app using this library.
Purpose
The purpose of this PR is to add a completion handler to be used with the submitBackgroundUpload API. This will allow the library to use a the URLSessionDataDelegate to receive the response and pass it to the provided completion handler from the app using the library.
Scope
The FileUploadProgress component has been updated to also use the URLSessionDataDelegate so that it can receive the final response after uploading a file. This response will then be provided to the completion handler associated with the background task identifier.
Issue Link
#18 : Background Upload Completion Handler Missing for Response