-
Notifications
You must be signed in to change notification settings - Fork 647
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
Support sending precalculated Content-MD5 header #1867
Conversation
681fc80
to
fe85f9d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a functional_tests.go
@butonic
fe85f9d
to
81a17ed
Compare
@harshavardhana I tried to copy and adapt an existing test. Let me know if this works for you. |
81a17ed
to
6195b80
Compare
wow ... trying to run
|
This requires multipart uploads to be disabled. I am a bit hesitant, since that isn't really obvious. Also errors:
|
hm, looking at the makefile
that seems fishy ... |
you are missing |
6195b80
to
79a0b5f
Compare
yes, that was on purpose to show that a sytax error in functional_tests.go will not stop
while |
I see ... the functional_tests.go has a main() and is meant to be executed ... sorry for the confusion. @klauspost so what do we do about the multipart uploads? we could disable them ... and add an explicit |
We already have the MD5 of the content and want to send along the Content-MD5 header without minio-go having to recalculate the hash. With this PR we can set `SendContentMd5: false` and send our hash as `UserMetadata`. Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
79a0b5f
to
03e8414
Compare
Multipart uploads are automatically used for files > 16MB (minPartSize) or the opts.PartSize. We have to calculate other hashes and can easily precalculate multiple md5hashes for every part. @klauspost what about a |
There is no way to do this in the current API style cleanly, you can use minio.Core() functionality to pass your own md5sum and also construct your own API wrappers. That should serve the purpose. |
We already have the MD5 of the content and want to send along the
Content-MD5
header without minio-go having to recalculate the hash. With this PR we can setSendContentMd5: false
and send our hash asUserMetadata
.