Support attaching a file / pasting a screenshot when creating a new ticket

The "New ticket" modal only took a plain-text message. It now matches the
existing reply box on an open ticket: a "Прикрепить файл" button, and Ctrl+V
paste of a clipboard screenshot attaches it directly. POST /api/tickets
switched from JSON to multipart/form-data to carry the optional file,
reusing the same saveAttachment/attachment-delivery path replies already use.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GteWhnWKTmnXcsd5jx6H7u
This commit is contained in:
ogrechkoandClaude Sonnet 5 committed 2026-08-19 07:54:23 +00:00
1 parent 955fdeee41
commit 5af360fd15
3 files changed
+98 -17

No files matched your search

+2
View File
@@ -619,6 +619,7 @@ export async function createManualTicket(params: {
body: string;
customerName: string;
customerEmail?: string;
attachment?: AttachmentInput;
}) {
const [customer] = await db
.insert(customers)
@@ -642,6 +643,7 @@ export async function createManualTicket(params: {
authorName: params.customerName,
body: params.body,
direction: "in",
attachments: params.attachment ? [params.attachment] : undefined,
});
}