feat: file/screenshot attachments on support tickets (v0.49.1)
Support form now accepts up to 5 attachments (images, PDF, text, JSON, zip; 10MB each) via the existing S3/MinIO presigned-upload flow. New support_ticket_attachments table; attachment links get folded into the Gitea issue body and shown as thumbnails in both the user's ticket history and the admin support view. New presign endpoint (/api/v1/support/attachments/presign, rate-limited 20/hr) scoped to the uploading user rather than a ticket id, since the ticket doesn't exist yet at upload time. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -87,3 +87,9 @@ export function isOwnedReviewPhotoKey(key: string, recipeId: string, userId: str
|
||||
export function isOwnedAvatarKey(key: string, userId: string): boolean {
|
||||
return key.startsWith(`user-avatars/${userId}/`);
|
||||
}
|
||||
|
||||
/** Same rationale as isOwnedRecipePhotoKey — a support ticket doesn't exist yet
|
||||
* at upload time, so ownership is scoped to the uploading user, not a ticket id. */
|
||||
export function isOwnedSupportAttachmentKey(key: string, userId: string): boolean {
|
||||
return key.startsWith(`support/${userId}/`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user