diff --git a/cmd/neofs-cli/modules/object.go b/cmd/neofs-cli/modules/object.go index c4a085cc2..7b7a9849d 100644 --- a/cmd/neofs-cli/modules/object.go +++ b/cmd/neofs-cli/modules/object.go @@ -10,6 +10,7 @@ import ( "io/ioutil" "math" "os" + "path/filepath" "strconv" "strings" "time" @@ -494,7 +495,7 @@ func parseObjectAttrs(cmd *cobra.Command) ([]*object.Attribute, error) { disableFilename, _ := cmd.Flags().GetBool("disable-filename") if !disableFilename { - filename := cmd.Flag("file").Value.String() + filename := filepath.Base(cmd.Flag("file").Value.String()) attr := object.NewAttribute() attr.SetKey(object.AttributeFileName) attr.SetValue(filename)