This commit is contained in:
2026-02-13 17:30:39 +01:00
parent 20e90ec240
commit 9dfb1a9755
6 changed files with 84 additions and 13 deletions

View File

@@ -346,9 +346,11 @@ func (s *Server) HandleUploadStream(w http.ResponseWriter, r *http.Request) {
ctx := context.Background()
// Upload to S3
// When using chunked transfer (io.Pipe), ContentLength is -1
// MinIO requires -1 for unknown size to use streaming upload
size := r.ContentLength
if size < 0 {
size = 0
size = -1 // Use streaming upload for unknown size
}
if err := s.s3Backend.Upload(ctx, storageKey, r.Body, size); err != nil {