mirror of
https://github.com/minio/minio.git
synced 2025-01-25 21:53:16 -05:00
Fix: send decrypted size to notification event (#7248)
This commit is contained in:
parent
b6c00405ec
commit
755e675d5c
@ -1312,6 +1312,7 @@ func (api objectAPIHandlers) PutObjectHandler(w http.ResponseWriter, r *http.Req
|
|||||||
|
|
||||||
if objectAPI.IsEncryptionSupported() {
|
if objectAPI.IsEncryptionSupported() {
|
||||||
if crypto.IsEncrypted(objInfo.UserDefined) {
|
if crypto.IsEncrypted(objInfo.UserDefined) {
|
||||||
|
objInfo.Size, _ = objInfo.DecryptedSize()
|
||||||
switch {
|
switch {
|
||||||
case crypto.S3.IsEncrypted(objInfo.UserDefined):
|
case crypto.S3.IsEncrypted(objInfo.UserDefined):
|
||||||
w.Header().Set(crypto.SSEHeader, crypto.SSEAlgorithmAES256)
|
w.Header().Set(crypto.SSEHeader, crypto.SSEAlgorithmAES256)
|
||||||
@ -2347,6 +2348,11 @@ func (api objectAPIHandlers) CompleteMultipartUploadHandler(w http.ResponseWrite
|
|||||||
host, port = "", ""
|
host, port = "", ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if objectAPI.IsEncryptionSupported() {
|
||||||
|
if crypto.IsEncrypted(objInfo.UserDefined) {
|
||||||
|
objInfo.Size, _ = objInfo.DecryptedSize()
|
||||||
|
}
|
||||||
|
}
|
||||||
// Notify object created event.
|
// Notify object created event.
|
||||||
sendEvent(eventArgs{
|
sendEvent(eventArgs{
|
||||||
EventName: event.ObjectCreatedCompleteMultipartUpload,
|
EventName: event.ObjectCreatedCompleteMultipartUpload,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user