Timothy J. Baek 7 tháng trước cách đây
mục cha
commit
e3889522d6
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      backend/open_webui/apps/webui/models/files.py

+ 4 - 1
backend/open_webui/apps/webui/models/files.py

@@ -112,7 +112,10 @@ class FilesTable:
         with get_db() as db:
             return [
                 FileModel.model_validate(file)
-                for file in db.query(File).filter(File.id.in_(ids)).all()
+                for file in db.query(File)
+                .filter(File.id.in_(ids))
+                .order_by(File.updated_at.desc())
+                .all()
             ]
 
     def get_files_by_user_id(self, user_id: str) -> list[FileModel]: