Skip to content

Commit e58f35b

Browse files
committed
update maxFileSize error to include filename
1 parent 2c1e6c8 commit e58f35b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cmd/submit.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,13 @@ func runSubmit(cfg config.Config, flags *pflag.FlagSet, args []string) error {
163163
}
164164
const maxFileSize int64 = 65535
165165
if info.Size() >= maxFileSize {
166-
msg :=`
166+
msg := `
167167
168-
The submitted file is larger than the max allowed file size of %d bytes. Please reduce the size of the file and try again.
168+
The submitted file '%s' is larger than the max allowed file size of %d bytes.
169+
Please reduce the size of the file and try again.
169170
170171
`
171-
return fmt.Errorf(msg, maxFileSize)
172+
return fmt.Errorf(msg, file, maxFileSize)
172173
}
173174
if info.Size() == 0 {
174175

0 commit comments

Comments
 (0)