diff --git a/cmd/ots-cli/cmd_create.go b/cmd/ots-cli/cmd_create.go index bc7e5d9..4d4d40d 100644 --- a/cmd/ots-cli/cmd_create.go +++ b/cmd/ots-cli/cmd_create.go @@ -87,7 +87,7 @@ func createRunE(cmd *cobra.Command, _ []string) (err error) { } secret.Attachments = append(secret.Attachments, client.SecretAttachment{ - Name: f, + Name: path.Base(f), Type: mime.TypeByExtension(path.Ext(f)), Content: content, })