fix: temporarily write blob directly as response body without http.ServeContent
arcad/edge/pipeline/head This commit looks good
Details
arcad/edge/pipeline/head This commit looks good
Details
This commit is contained in:
parent
b120e590b6
commit
753a6c9708
|
@ -2,6 +2,7 @@ package blob
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"io"
|
||||||
"io/fs"
|
"io/fs"
|
||||||
"mime/multipart"
|
"mime/multipart"
|
||||||
"net/http"
|
"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 {
|
type uploadedFile struct {
|
||||||
|
|
Loading…
Reference in New Issue