Skip to content

Commit

Permalink
feat(thumbnail): Adding flush when streaming content
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Nov 5, 2022
1 parent 32fa1a2 commit 85d7972
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/thumbnail/thumbnail.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,14 @@ func (a App) List(w http.ResponseWriter, r *http.Request, item absto.Item, items
}
}

flusher, ok := w.(http.Flusher)

for _, item := range items {
a.encodeContent(ctx, w, isDone, item)

if ok {
flusher.Flush()
}
}
}

Expand Down

0 comments on commit 85d7972

Please sign in to comment.