Skip to content

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

Open

Description

@Alpha-chen

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?

Activity

  1. Acconut commented on Jul 11, 2024

    @Acconut
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions