Skip to content

mediaProbePathFromUrl

从 URL 或路径中提取用于扩展名 / 媒体类型探测的路径段(去掉 query 与 hash)。

函数签名

typescript
function mediaProbePathFromUrl(raw: string): string

使用场景

  • 附件 URL 带签名参数时,按 path 扩展名推断图片/视频类型
  • Markdown 内联媒体节点识别