From c2bdb208b91237fa7c55474dbb4130c45f89a68a Mon Sep 17 00:00:00 2001 From: SD-gif Date: Fri, 18 Sep 2026 02:15:23 +0900 Subject: [PATCH] =?UTF-8?q?feat(community):=20=EC=97=85=EB=A1=9C=EB=93=9C?= =?UTF-8?q?=EA=B0=80=20=EC=A4=80=20=EC=B6=95=EC=86=8C=EB=B3=B8=20=EC=A3=BC?= =?UTF-8?q?=EC=86=8C=EB=A5=BC=20=EA=B2=8C=EC=8B=9C=EB=AC=BC=EC=97=90=20?= =?UTF-8?q?=EB=84=98=EA=B8=B4=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 목록 화면은 이미 thumbnailUrl 을 쓰고 있어, 업로드 응답의 값을 작성 요청에 그대로 실어 보내면 목록이 원본 대신 사본을 받는다. Co-Authored-By: Claude Opus 5 --- src/app/(app)/community/new/page.tsx | 1 + src/lib/api/posts.ts | 2 ++ src/types/api/post.ts | 2 ++ 3 files changed, 5 insertions(+) diff --git a/src/app/(app)/community/new/page.tsx b/src/app/(app)/community/new/page.tsx index f91968a..3383793 100644 --- a/src/app/(app)/community/new/page.tsx +++ b/src/app/(app)/community/new/page.tsx @@ -276,6 +276,7 @@ export default function CommunityNewPage() { content: text.trim(), mediaList: uploaded.map((m, i) => ({ url: m.url, + thumbnailUrl: m.thumbnailUrl, mediaType: m.mediaType, sortOrder: i, placeId: mediaPlaces[i]?.placeId ?? null, diff --git a/src/lib/api/posts.ts b/src/lib/api/posts.ts index 1717535..25a98a3 100644 --- a/src/lib/api/posts.ts +++ b/src/lib/api/posts.ts @@ -14,6 +14,8 @@ type FeedParams = { type UploadedMedia = { url: string; + /** 목록용 축소본. 서버가 만들지 못했으면 null 이고, 이때 화면은 원본을 쓴다 */ + thumbnailUrl: string | null; mediaType: "IMAGE" | "VIDEO"; }; diff --git a/src/types/api/post.ts b/src/types/api/post.ts index 7ff43e3..96358cb 100644 --- a/src/types/api/post.ts +++ b/src/types/api/post.ts @@ -6,6 +6,8 @@ export type PostAuthor = { export type PostMedia = { url: string; + /** 목록용 축소본. 없으면 화면이 url 을 쓴다 */ + thumbnailUrl?: string | null; mediaType: "IMAGE" | "VIDEO"; sortOrder: number; placeId: number | null;