mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-07-11 00:33:40 +00:00
Message-attachment uploads create File rows without a conversationId — they are referenced only from Message.files[].file_id and the conversation's files array (only Code Interpreter outputs set conversationId). The conversation-scoped file caps therefore missed regular attachments entirely: converting a pre-existing chat left their expiredAt null, so storage cleanup never swept them after the conversation and messages expired. Collect the referenced file ids (conversation.files plus one pass over the chat's messages) and extend the file caps to match file_id as well as conversationId, in the single cascade, saveConvo, the bulk tag/project cascade, and both sweep passes. The id scan runs at conversion/alignment time only — post-conversion uploads always receive a deadline at upload, so conforming- parent writes keep the cheap conversationId-scoped cap. A file shared across chats is capped to the earliest converting chat's deadline, consistent with cap-don't-extend. |
||
|---|---|---|
| .. | ||
| api | ||
| client | ||
| data-provider | ||
| data-schemas | ||