diff --git a/apps/backend/src/routes/post.ts b/apps/backend/src/routes/post.ts index d395c4d..d921751 100644 --- a/apps/backend/src/routes/post.ts +++ b/apps/backend/src/routes/post.ts @@ -577,7 +577,7 @@ export default new Elysia({ prefix: "/post" }) const { media: _media, ...tweetWithoutMedia } = tweetData.tweet; const normalizedTags = normalizeTags(body.tag || ["미분류"]); - const mediaType = (mediaItem.type === "video" || mediaItem.type === "gif") ? "video" : "image"; + const mediaType = (mediaItem.type === "video" || mediaItem.type === "gif" || (mediaItem.format && mediaItem.format.includes("video"))) ? "video" : "image"; const result = await uploadAndCreateWithRetry({ fileName, diff --git a/apps/frontend/src/app/add/page.tsx b/apps/frontend/src/app/add/page.tsx index 1ccc0dc..605c9a9 100644 --- a/apps/frontend/src/app/add/page.tsx +++ b/apps/frontend/src/app/add/page.tsx @@ -188,7 +188,7 @@ export default function AddPage() { const items: PreviewItem[] = mediaItems .map((m) => ({ url: (m as any).thumbnail_url || (m as any).url || "", - type: (((m as any).type === "video" || (m as any).type === "gif") ? "video" : "image") as "image" | "video" + type: (((m as any).type === "video" || (m as any).type === "gif" || ((m as any).format && (m as any).format.includes("video"))) ? "video" : "image") as "image" | "video" })) .filter((item) => item.url.length > 0);