Skip to content

Commit

Permalink
fix: save tags when using chunk/stream (#4920)
Browse files Browse the repository at this point in the history
  • Loading branch information
acha-bill authored Feb 3, 2025
1 parent c70cbfb commit 5456d14
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/api/chunk_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"github.com/ethersphere/bee/v2/pkg/jsonhttp"
"github.com/ethersphere/bee/v2/pkg/log"
"github.com/ethersphere/bee/v2/pkg/postage"
storage "github.com/ethersphere/bee/v2/pkg/storage"
storer "github.com/ethersphere/bee/v2/pkg/storer"
"github.com/ethersphere/bee/v2/pkg/storage"
"github.com/ethersphere/bee/v2/pkg/storer"
"github.com/ethersphere/bee/v2/pkg/swarm"
"github.com/gorilla/websocket"
)
Expand Down Expand Up @@ -56,7 +56,8 @@ func (s *Service) chunkUploadStreamHandler(w http.ResponseWriter, r *http.Reques
}

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

0 comments on commit 5456d14

Please sign in to comment.