Please provide a robust way to resume the upload #2872
Labels
feature-request
Request a new feature
s3
Issues with the AWS Android SDK for Simple Storage Service (S3).
Which AWS Services is the feature request for?
S3 TransferUtility under com.amazonaws:aws-android-sdk-s3:<latest_release_version>
Code snippet which I use for upload/resume.
Is your feature request related to a problem? Please describe.
Yes, multipart upload feature is not effective during a worker restart if the process is recreated.
Currently, TransferUtility expects the client app to pass
transferRecordId
for resuming the upload process. The problem with this approach is:(1) The client has to get the
transferRecordId
by listening to theTransferListener
and keep it. There are possibilities that the client app may not receive atransferId
from the SDK (or the client might not have handled it properly). In this case, the upload cannot be resumed.(2) The app has to add the
transferId
to persistent storage for resuming the upload during a process restart (like an app crash, or a worker restart after a process restart, etc.). It is not the responsibility of the app to maintain thetransferId
, which is used only by the SDK for tracking upload/pause/resume.Describe the solution you'd like
The
upload
andresume
should have similar arguments. The SDK can usetransferRecordId
internally, but the app should not worry abouttransferRecordId
, instead it should passuploadKey
andfile
(same arguments which theupload()
method uses).Please add a resume method as below:
Describe alternatives you've considered
Currently, I am maintaining a session variable for keeping
transferRecordId
as a work around. But, this won't work during a process restart and the upload starts from the beginning (by ignoring all previously uploaded parts)Additional context
I have provided all details in this ticket. In case if you need some more inputs, please let me know.
The text was updated successfully, but these errors were encountered: