feat(frontend,backend): storage panel with weight rows and trash, heavy media streams by url in the viewer
This commit is contained in:
1 parent
f2c245707a
commit
55634984fd
19 files changed
+1822
-24
No files matched your search
@@ -282,6 +282,7 @@ class TrashItemView(BaseModel):
|
||||
class TrashOutcome(BaseModel):
|
||||
files: int = 0
|
||||
bytes: int = 0
|
||||
keys: list[str] = []
|
||||
blocked: list[int] = []
|
||||
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ _TRASH = """
|
||||
SELECT storage_key, chat_id, message_id, kind, mime, file_name, file_size,
|
||||
trashed_at
|
||||
FROM media_trash WHERE account_id = $1
|
||||
ORDER BY trashed_at DESC, storage_key
|
||||
ORDER BY file_size DESC NULLS LAST, storage_key
|
||||
"""
|
||||
|
||||
_TRASH_REFS = """
|
||||
|
||||
@@ -80,6 +80,7 @@ async def move_to_trash(
|
||||
media.file_size,
|
||||
)
|
||||
storage.trash(key)
|
||||
outcome.keys.append(key)
|
||||
outcome.files += 1
|
||||
outcome.bytes += media.file_size or 0
|
||||
return outcome
|
||||
|
||||
Reference in new issue
Block a user