Unify multipart upload endpoints - #2865
Closed
jjnesbitt wants to merge 4 commits into
Closed
Conversation
jjnesbitt
commented
Jul 16, 2026
Comment on lines
+113
to
+123
| class UploadValidationResponseSerializer(AssetBlobSerializer): | ||
| # Zarr fields, null for asset blob uploads. The inherited AssetBlob | ||
| # fields are likewise null for zarr uploads. | ||
| zarr_id = serializers.UUIDField(allow_null=True, default=None) | ||
| chunk_key = serializers.CharField(allow_null=True, default=None) | ||
|
|
||
| class Meta(AssetBlobSerializer.Meta): | ||
| fields = [*AssetBlobSerializer.Meta.fields, 'zarr_id', 'chunk_key'] | ||
| # Default the inherited AssetBlob fields to null so the zarr case only | ||
| # needs to supply its own fields. | ||
| extra_kwargs = {field: {'default': None} for field in AssetBlobSerializer.Meta.fields} |
Member
Author
There was a problem hiding this comment.
This is sort of ugly, but the intent was to avoid simply duplicating the fields from AssetBlobSerializer, in case anything were to change in the future.
jjnesbitt
marked this pull request as ready for review
July 16, 2026 16:52
jjnesbitt
marked this pull request as draft
July 16, 2026 20:19
Member
Author
|
Closed in favor of #2869 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR unifies the zarr and asset blob multipart upload endpoints into the singular existing assetblob upload endpoint. The prior change in #2784 was merged to master, but not deployed to production.
This change is intended to be backwards compatible with the CLI, as it simply extends the fields present in both the upload initialize and upload complete endpoints. The existing CLI PR (dandi/dandi-cli#1839) that was pointed at the previous change in #2784 can either be reworked, or replaced with a new PR.