feat: ship end-to-end interior design MVP

This commit is contained in:
Codex
2026-08-02 08:57:10 +08:00
parent 4d97a30616
commit a96b1bf9f9
12 changed files with 2497 additions and 485 deletions
+12
View File
@@ -87,6 +87,18 @@ class S3Storage:
)
return response["Body"].read(), response.get("ContentType", "application/octet-stream")
def put_render(self, object_key: str, content: bytes, content_type: str) -> None:
self._put(self._value("s3_bucket_renders"), object_key, content, content_type)
def get_render(self, object_key: str) -> tuple[bytes, str]:
if not self.configured:
raise RuntimeError("MinIO/S3 is not configured.")
response = self._client().get_object(
Bucket=self._value("s3_bucket_renders"),
Key=object_key,
)
return response["Body"].read(), response.get("ContentType", "application/octet-stream")
def _put(self, bucket: str, object_key: str, content: bytes, content_type: str) -> None:
if not self.configured:
raise RuntimeError("MinIO/S3 is not configured.")