Implement file drag & drop

This commit is contained in:
2025-09-25 18:47:29 +03:00
Unverified
parent 1db2d55f76
commit 0fbdcd04c9
7 changed files with 181 additions and 20 deletions
+3 -5
View File
@@ -41,11 +41,9 @@ def convert_message(msg: Message) -> dict:
"reply_to": convert_message(msg.reply_to) if msg.reply_to else None,
"files": [
{
"path": f"/api/files/{'encrypted' if f.encrypted else 'normal'}/{Path(f.path).name}",
"encrypted": f.encrypted,
"filename": f.filename,
"content_type": f.content_type,
"size": f.size,
"path": f"/api/uploads/files/normal/{Path(f.path).name}",
"id": f.id,
"message_id": f.message_id
}
for f in (msg.files or [])
]