feat: enhance OneDrive folder management by adding mimeType handling and integrating DriveFolderTree component for improved UI

This commit is contained in:
Anish Sarkar 2026-03-29 03:29:31 +05:30
parent 101e426792
commit c8767272ec
10 changed files with 257 additions and 606 deletions

View file

@ -24,6 +24,10 @@ async def list_folder_contents(
for item in items:
item["isFolder"] = is_folder(item)
if item["isFolder"]:
item.setdefault("mimeType", "application/vnd.ms-folder")
else:
item.setdefault("mimeType", item.get("file", {}).get("mimeType", "application/octet-stream"))
items.sort(key=lambda x: (not x["isFolder"], x.get("name", "").lower()))