From 42bb74c15c4fa9002cca7c34d0cdff6d5f5cab8e Mon Sep 17 00:00:00 2001 From: Yared Yemane Date: Wed, 8 Apr 2026 02:11:34 -0700 Subject: [PATCH] handle Vimeo intro URLs without import failure Normalize Vimeo page URLs to embed URLs for intro video fields instead of forcing /files/upload URL import that can fail behind verification gates. Made-with: Cursor --- src/pages/content-management/AddNewPracticePage.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pages/content-management/AddNewPracticePage.tsx b/src/pages/content-management/AddNewPracticePage.tsx index 3160d1a..5010e87 100644 --- a/src/pages/content-management/AddNewPracticePage.tsx +++ b/src/pages/content-management/AddNewPracticePage.tsx @@ -249,6 +249,13 @@ export function AddNewPracticePage() { const handleImportIntroVideoFromUrl = async () => { const source = introVideoUrl.trim() if (!source || !/^https?:\/\//i.test(source)) return + const vimeoEmbed = toVimeoEmbedUrl(source) + // Vimeo page URLs can be protected by anti-bot checks when server-side fetched. + // For those links, prefer local normalization to player URL instead of failing import. + if (vimeoEmbed) { + setIntroVideoUrl(vimeoEmbed) + return + } setImportingIntroVideoUrl(true) try {