Fix error handlers for API mode; distinguish files from directories in object lookup; Fix UI not showing newly uploaded objects by adding Cache-Control headers

This commit is contained in:
2026-02-05 20:44:11 +08:00
parent e76c311231
commit 033b8a82be
4 changed files with 53 additions and 11 deletions

View File

@@ -522,7 +522,7 @@ class ObjectStorage:
def get_object_path(self, bucket_name: str, object_key: str) -> Path:
path = self._object_path(bucket_name, object_key)
if not path.exists():
if not path.is_file():
raise ObjectNotFoundError("Object not found")
return path