diff --git a/go/cli/mcap/cmd/attachment.go b/go/cli/mcap/cmd/attachment.go index 1fbe7f2728..8a0f8994a2 100644 --- a/go/cli/mcap/cmd/attachment.go +++ b/go/cli/mcap/cmd/attachment.go @@ -164,7 +164,7 @@ var addAttachmentCmd = &cobra.Command{ { LogTime: logTime, CreateTime: createTime, - Name: addAttachmentFilename, + Name: utils.DefaultString(addAttachmentName, addAttachmentFilename), MediaType: addAttachmentMediaType, DataSize: uint64(contentLength), Data: attachment,