mirror of
https://github.com/pgsty/minio.git
synced 2026-07-22 13:40:22 +03:00
Fix PutObject Trailing checksum (#20456)
PutObject would verify trailing checksums, but not store them. Fixes #20455
This commit is contained in:
@@ -366,6 +366,14 @@ func (r *Reader) ContentCRC() map[string]string {
|
||||
return map[string]string{r.contentHash.Type.String(): r.contentHash.Encoded}
|
||||
}
|
||||
|
||||
// Checksum returns the content checksum if set.
|
||||
func (r *Reader) Checksum() *Checksum {
|
||||
if !r.contentHash.Type.IsSet() || !r.contentHash.Valid() {
|
||||
return nil
|
||||
}
|
||||
return &r.contentHash
|
||||
}
|
||||
|
||||
var _ io.Closer = (*Reader)(nil) // compiler check
|
||||
|
||||
// Close and release resources.
|
||||
|
||||
Reference in New Issue
Block a user