feat: support video detection based on media format field in frontend and backend

This commit is contained in:
암냥 2026-04-23 19:21:03 +09:00
commit d6546aeba6
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -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);