From 5698550dca633a3935ccbfa30ac5123daf95be45 Mon Sep 17 00:00:00 2001 From: noys Date: Wed, 24 Apr 2024 14:51:43 +0300 Subject: [PATCH] :rotating_light: --- http/filestream/filestream.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/http/filestream/filestream.go b/http/filestream/filestream.go index 1eeef41..e6ab382 100644 --- a/http/filestream/filestream.go +++ b/http/filestream/filestream.go @@ -82,7 +82,10 @@ func WriteFilesToStreamWithProgressBar(multipartWriter *multipart.Writer, filesL return errors.Join(err, writeErr(multipartWriter, file, err)) } if bar != nil { - bar.Add(1) + err = bar.Add(1) + if err != nil { + return fmt.Errorf("failed to update progress bar: %w", err) + } } }