Tweakhancement: show file extension in StoragePath test (#12452)

This commit is contained in:
shamoon authored and GitHub committed 2026-03-28 13:58:33 -07:00
1 parent 9383471fa0
commit 129da3ade7
2 files changed
+40 -14

No files matched your search

+6
View File
@@ -3290,6 +3290,12 @@ class StoragePathViewSet(PermissionsAwareDocumentCountMixin, ModelViewSet):
path = serializer.validated_data.get("path")
result = format_filename(document, path)
if result:
extension = (
Path(str(document.filename)).suffix if document.filename else ""
) or document.file_type
result_path = Path(result)
result = str(result_path.with_name(f"{result_path.name}{extension}"))
return Response(result)