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

Add metadata into parallel uploads. #701

Conversation

loren-m-crawford
Copy link
Contributor

@loren-m-crawford loren-m-crawford commented Jul 9, 2024

👋 This PR is more of a proposal to allow for parallel uploads to keep the metadata from the original request. My team has found that maintaining metadata in the parallel upload requests would benefit our use case.

The PR does two main things:

  1. Adds an option retainMetadataForParallelUploads that is defaulted to false. This option would be for our use case (or anyone else's) that would allow the retention of metadata in partial uploads, too.
  2. Checks the retainMetadataForParallelUploads option during the parallel upload logic. If it's set to true, then we ensure the metadata is maintained, if it is false (default behavior), we remove it.

@loren-m-crawford loren-m-crawford marked this pull request as ready for review July 9, 2024 16:16
@Acconut
Copy link
Member

Acconut commented Jul 11, 2024

Thanks for opening this PR! You're right that tus-js-client currently does not offer a way to set metadata for partial uploads. This is not ideal, especially since we also mention that metadata can be used to identify the users corresponding to an upload. I wonder if there are also use case where one wants to use different meta data for partial uploads versus the final upload. In such cases, an option to retain the meta data would not be sufficient and we would need an option to specify custom metadata for the partial uploads.

What do you think?

@loren-m-crawford
Copy link
Contributor Author

@Acconut 👋 You make a good point. Perhaps instead of maintaining the metadata from the original request, there can be an additional option for parallel upload metadata that can either be the same as the original request metadata or be more tailored. Thinking maybe something like: https://github.com/loren-m-crawford/tus-js-client/pull/2/files
What do you think?

@Acconut
Copy link
Member

Acconut commented Sep 9, 2024

Superseeded by #703.

@Acconut Acconut closed this Sep 9, 2024
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

Successfully merging this pull request may close these issues.

2 participants