Skip to content
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

[Storage]: Multi-part upload results in many progress updates with 100% status #2869

Open
1 task done
mattcreaser opened this issue Jul 8, 2024 · 0 comments
Open
1 task done
Assignees
Labels
bug Something isn't working storage Related to the Storage category/plugins

Comments

@mattcreaser
Copy link
Member

Before opening, please confirm:

Language and Async Model

Kotlin

Amplify Categories

Storage

Gradle script dependencies

// Put output below this line

Environment information

# Put output below this line


Please include any relevant guides or documentation you're referencing

No response

Describe the bug

When uploading a file over 5mb Amplify performs a multi-part upload. When this upload completes there are multiple progress updates sent in a burst with a completion percentage of 100%. The number of such updates appears to be proportional to the size of the file - for a file measuring 472mb, I noted that this resulted in several hundred callbacks.

There should only be one progress update sent with a completion percentage of 100%.

Reproduction steps (if applicable)

  1. Create an app that can upload a file to S3 with Amplify
  2. Attempt to upload a file that is >= 5mb. This will result in a multi-part upload.
  3. Observe the progress updates received. Note that there are multiple callbacks with progress == 1.0. The larger the file, the higher the number of such callbacks received.

Code Snippet

Amplify.Storage.uploadFile(
    StoragePath.fromString(path), 
    file, 
    StorageUploadFileOptions.defaultInstance(),
    { Log.i("MyAmplifyApp", "Fraction completed: ${it.fractionCompleted} (${it.currentBytes} / ${it.totalBytes})") },
    { Log.i("MyAmplifyApp", "Successfully uploaded: ${it.path}") },
    { Log.e("MyAmplifyApp", "Upload failed", it) }
)

Log output

// Put your logs below this line


amplifyconfiguration.json

No response

GraphQL Schema

// Put your schema below this line

Additional information and screenshots

No response

@github-actions github-actions bot added the pending-triage Issue is pending triage label Jul 8, 2024
@mattcreaser mattcreaser added bug Something isn't working storage Related to the Storage category/plugins and removed pending-triage Issue is pending triage labels Jul 8, 2024
@vincetran vincetran self-assigned this Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working storage Related to the Storage category/plugins
Projects
None yet
Development

No branches or pull requests

2 participants