Fix: Remove path from filename if given

fixes #135

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2023-10-18 15:09:52 +02:00
parent a83ae9ceb3
commit 9322acfcb5
Signed by: luzifer
GPG Key ID: D91C3E91E4CAD6F5

View File

@ -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,
})