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
This commit is contained in:
parent
cb2a6843a3
commit
42bb74c15c
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user