added steps to correct content type in minio
Code Quality Pipeline / code-quality (pull_request) Failing after 39s
Test Python Package / test (pull_request) Successful in 30s

This commit is contained in:
Brian Bjarke Jensen
2025-09-18 19:45:17 +02:00
parent f1bfd02b7e
commit 60c0993d59
4 changed files with 20 additions and 10 deletions
@@ -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."""
+2 -1
View File
@@ -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."""