Skip to content

Commit 5456d14

Browse files
authored
fix: save tags when using chunk/stream (#4920)
1 parent c70cbfb commit 5456d14

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/api/chunk_stream.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414
"github.com/ethersphere/bee/v2/pkg/jsonhttp"
1515
"github.com/ethersphere/bee/v2/pkg/log"
1616
"github.com/ethersphere/bee/v2/pkg/postage"
17-
storage "github.com/ethersphere/bee/v2/pkg/storage"
18-
storer "github.com/ethersphere/bee/v2/pkg/storer"
17+
"github.com/ethersphere/bee/v2/pkg/storage"
18+
"github.com/ethersphere/bee/v2/pkg/storer"
1919
"github.com/ethersphere/bee/v2/pkg/swarm"
2020
"github.com/gorilla/websocket"
2121
)
@@ -56,7 +56,8 @@ func (s *Service) chunkUploadStreamHandler(w http.ResponseWriter, r *http.Reques
5656
}
5757

5858
// if tag not specified use direct upload
59-
putter, err := s.newStamperPutter(r.Context(), putterOptions{
59+
// Using context.Background here because the putter's lifetime extends beyond that of the HTTP request.
60+
putter, err := s.newStamperPutter(context.Background(), putterOptions{
6061
BatchID: headers.BatchID,
6162
TagID: tag,
6263
Deferred: tag != 0,

0 commit comments

Comments
 (0)