added steps to correct content type in minio
This commit is contained in:
@@ -23,6 +23,7 @@ class AnnotationRepository(MinioAdapter, AnnotationRepositoryInterface):
|
||||
|
||||
encoding: str = "utf-8"
|
||||
data_format: str = "json"
|
||||
content_type: str = "application/json"
|
||||
folder_name: str = "annotations"
|
||||
|
||||
@classmethod
|
||||
@@ -81,7 +82,7 @@ class AnnotationRepository(MinioAdapter, AnnotationRepositoryInterface):
|
||||
buffer = BytesIO(data_bytes)
|
||||
# Put object
|
||||
object_name = self._object_name(job_id)
|
||||
self._put(object_name, buffer)
|
||||
self._put(object_name, buffer, self.content_type)
|
||||
|
||||
def delete(self, job_id: UUID) -> None:
|
||||
"""Delete an Annotation by its job ID."""
|
||||
|
||||
@@ -15,6 +15,7 @@ class ImageRepository(MinioAdapter, ImageRepositoryInterface):
|
||||
"""ImageRepository implementation using MinIO as the backend."""
|
||||
|
||||
image_format: str = "PNG"
|
||||
content_type: str = "image/png"
|
||||
folder_name: str = "images"
|
||||
|
||||
@classmethod
|
||||
@@ -57,7 +58,7 @@ class ImageRepository(MinioAdapter, ImageRepositoryInterface):
|
||||
image.save(buffer, self.image_format)
|
||||
# Put object
|
||||
object_name = self._object_name(image_id)
|
||||
self._put(object_name, buffer)
|
||||
self._put(object_name, buffer, self.content_type)
|
||||
|
||||
def delete(self, image_id: UUID) -> None:
|
||||
"""Delete an Image by its ID."""
|
||||
|
||||
Reference in New Issue
Block a user