fix: fix minio upload issue

This commit is contained in:
Abhishek Kumar 2026-07-03 19:54:14 +05:30
parent 04902fcc65
commit c7df119997

View file

@ -1,4 +1,5 @@
import asyncio
import io
import json
from typing import Any, Dict, Optional
@ -94,10 +95,11 @@ class MinioFileSystem(BaseFileSystem):
data = await content.read()
def _put():
# The MinIO SDK requires a stream with .read(), not raw bytes.
self.client.put_object(
self.bucket_name,
file_path,
data=bytes(data),
data=io.BytesIO(data),
length=len(data),
)