mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-25 12:01:04 +02:00
fix: fix minio upload issue
This commit is contained in:
parent
04902fcc65
commit
c7df119997
1 changed files with 3 additions and 1 deletions
|
|
@ -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),
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue