fix
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user