-
Notifications
You must be signed in to change notification settings - Fork 10
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
DJANGO_API: allow for upload of 0-length file #168
Comments
This will require adjusting the part size algorithm first. Currently it does not yield any parts when the requested size is 0. It should instead yield one part of size 0. |
sounds like a way to go forward and then (for #160) to update $> dandi digest /tmp/zero
/tmp/zero: d41d8cd98f00b204e9800998ecf8427e-0 thus reflecting the fact that there is no parts ( |
the issue persist (although not hit for any real use case yet):
and I thought that we already use dandi-cli's DandiETag in the dandi-api , so this might be some additional check on file size (since it is about |
Looks like the serializers are still setting the I just tried to set them to 0, but Minio is giving me this error when attempting to complete an upload with no parts in it:
The request body to complete the multipart upload looked like this:
That looks fine to me, so I assume that the object store requires at least one part for a multipart upload. If you really need an upload of size 0, we would have to try tweaking it so that it returns a part of size 0. It's possible that might also fail, in which case we would have to resort to a normal, non-multipart upload just for this one edge case. |
I don't mind us to returning 1-part of 0 size. But could you check first, even if manually, that minio/aws would allow for such upload? |
of cause we could easily provide a branch with dandi-cli which does that (without merging /releasing) if that would make it easier to test |
This seems like a lot of work to support an edge case that will maybe never arise in practice. I'd like to either close the issue or de-emphasize it until it crops up as a hard requirement from, e.g., a real user. Let me know your thoughts, @yarikoptic. In the meantime, I will unassign @dchiquito from working on it. |
Closing this until it's needed by an actual use case. |
me, as a non-real use case again ran into this use-case... arrived to this issue only thanks due to search for |
initially detected/reported in dandi/dandi-cli#479 (comment)
although it is an odd use case and would exist solely in a singular blob instance due to deduplication, api backend should allow for an upload of such a file which I expect us to encounter whenever we allow uploads of non-nwb files. As such it is not a priority but should be done/fixed.
The text was updated successfully, but these errors were encountered: