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

How can I implement concurrent uploading of a large file in Android? #113

Open
Alpha-chen opened this issue Jul 10, 2024 · 1 comment
Open
Labels

Comments

@Alpha-chen
Copy link

Alpha-chen commented Jul 10, 2024

Question
How can I implement parallel uploading of a large file in Android?

I have read the article(https://tus.io/protocols/resumable-upload#concatenation), but I'm not sure how to add this header in the code. How can I implement parallel uploading of large files in Android?

@Acconut
Copy link
Member

Acconut commented Jul 11, 2024

Unlike tus-js-client, the tus-java-client does not have native support for the concatenation extension, so your endeavor would involve a lot of manual work. This means that you would have to split the large file on your own and start a separate, partial tus upload for each part. For each part, you should set Upload-Concat: partial, which can be done by overwriting the prepareConnection method, as is done here for SSL configuration: https://github.com/tus/tus-java-client?tab=readme-ov-file#can-i-use-my-own-custom-sslsocketfactory Once the parts are uploaded, you would have to manually send the final POST request to concatenate the partial uploads together.

All in all, not easy. I hope that we can add native support for this in the future.

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

No branches or pull requests

2 participants