♻️(backend) refactor uploaded file's key format

Remove the user-provided filename while preserving the extension,
and switch to the format `uuid.extension`.

This is more natural than the previous `uuid/.extension` format
and avoids confusion.

Update related tests accordingly.
This commit is contained in:
lebaudantoine
2026-03-10 20:09:20 +01:00
committed by Florent Chehab
parent 342f992556
commit f57db0acc8
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -952,7 +952,7 @@ class File(BaseModel):
_, extension = splitext(self.filename)
# We store only the extension in the storage system to avoid
# leaking Personal Information in logs, etc.
return f"{self.key_base}/{extension!s}"
return f"{self.key_base}{extension!s}"
def get_abilities(self, user):
"""