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

Upload not resuming unless we give a chunk size #22

Open
therealabdi2 opened this issue Sep 12, 2024 · 1 comment
Open

Upload not resuming unless we give a chunk size #22

therealabdi2 opened this issue Sep 12, 2024 · 1 comment

Comments

@therealabdi2
Copy link

therealabdi2 commented Sep 12, 2024

I've encountered an issue with the tus-js-client library where the upload process restarts from the beginning if there's an interruption due to a bad internet connection. This behavior occurs only when a chunk size is not specified. Specifying a chunk size prevents the issue but adversely affects the upload speed as described in the tus-js-client API documentation.

I suspect the issue may be related to the upload_offset not being updated on the backend after an internet disruption.

Steps to Reproduce:

Use the tus-js-client library to initiate an upload to the server. (Reference: tus-js-client)
During the upload, simulate an internet disruption (e.g., turn off the network connection).
Re-establish the internet connection and observe the behavior of the upload process.
Expected Result: The upload should resume from the last successful upload_offset.

Actual Result: The upload restarts from 0%.

Suggested Possible Fix: Review how upload_offset is managed in scenarios of internet reconnection and ensure it is properly updated to allow resuming uploads.

@dirkmoors
Copy link
Owner

Hello, feel free to provide a patch to mitigate that behavior. I'll review, and create a new release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants