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:
1 parent
955fdeee41
commit
5af360fd15
3 files changed
+98
-17
No files matched your search
@@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user