diff --git a/pkg/module/blob/http.go b/pkg/module/blob/http.go index 0c61a4f..adace58 100644 --- a/pkg/module/blob/http.go +++ b/pkg/module/blob/http.go @@ -2,6 +2,7 @@ package blob import ( "encoding/json" + "io" "io/fs" "mime/multipart" "net/http" @@ -164,7 +165,14 @@ func handleAppDownload(w http.ResponseWriter, r *http.Request) { } }() - http.ServeContent(w, r, string(replyMessage.BlobInfo.ID()), replyMessage.BlobInfo.ModTime(), replyMessage.Blob) + // TODO Fix usage of ServeContent + // http.ServeContent(w, r, string(replyMessage.BlobInfo.ID()), replyMessage.BlobInfo.ModTime(), replyMessage.Blob) + + w.Header().Add("Content-Type", replyMessage.BlobInfo.ContentType()) + + if _, err := io.Copy(w, replyMessage.Blob); err != nil { + logger.Error(ctx, "could not write blob", logger.CapturedE(errors.WithStack(err))) + } } type uploadedFile struct {