Files
ds-chat/backend/app/models/__init__.py
T
ksmithandClaude Sonnet 5 62e4760c8a Add admin-configurable upload size limits
The 8MB image/file/avatar cap is now a site setting (UploadSettings,
single-row table like SmtpSettings) editable from the Admin Settings tab,
instead of a hardcoded constant. All three upload endpoints read the live
value and interpolate it into their 413 messages. A new GET
/api/uploads/limit endpoint (open to any authenticated user, unlike the
admin-only settings endpoints) lets the composer reject an oversized file
client-side before it ever hits the network, though the server still
enforces the same cap independently.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-15 20:44:05 -06:00

41 lines
1.2 KiB
Python

from app.models.admin_audit_log import AdminAuditLog
from app.models.api_token import ApiToken
from app.models.base import Base
from app.models.event_subscription import EventSubscription
from app.models.invite import InviteStatus
from app.models.membership import RoomMembership, RoomRole
from app.models.message import Message
from app.models.message_file import MessageFile
from app.models.message_image import MessageImage
from app.models.message_reaction import MessageReaction
from app.models.password_reset import PasswordReset
from app.models.push_subscription import PushSubscription
from app.models.room import Room
from app.models.site_invite import SiteInvite
from app.models.smtp_settings import SmtpSettings
from app.models.upload_settings import UploadSettings
from app.models.user import User
from app.models.webhook_incoming import WebhookIncoming
__all__ = [
"Base",
"User",
"Room",
"RoomMembership",
"RoomRole",
"Message",
"MessageFile",
"MessageImage",
"MessageReaction",
"InviteStatus",
"PasswordReset",
"SiteInvite",
"SmtpSettings",
"UploadSettings",
"PushSubscription",
"AdminAuditLog",
"ApiToken",
"WebhookIncoming",
"EventSubscription",
]