diff --git a/cmd/notification.go b/cmd/notification.go index b03a919e1..4027f3a2a 100644 --- a/cmd/notification.go +++ b/cmd/notification.go @@ -537,6 +537,9 @@ func (args eventArgs) ToEvent() event.Event { if args.EventName != event.ObjectRemovedDelete { newEvent.S3.Object.ETag = args.Object.ETag newEvent.S3.Object.Size = args.Object.Size + if args.Object.IsCompressed() { + newEvent.S3.Object.Size = args.Object.GetActualSize() + } newEvent.S3.Object.ContentType = args.Object.ContentType newEvent.S3.Object.UserMetadata = args.Object.UserDefined }