MCPcopy Index your code
hub / github.com/ColmapView/Colmapview.github.io / getFilenameFromUrl

Function getFilenameFromUrl

src/utils/urlUtils.ts:192–199  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

190 * contain `#`, spaces, etc. Falls back to the raw segment on malformed escapes.
191 */
192export function getFilenameFromUrl(url: string): string {
193 const segment = new URL(url).pathname.split('/').pop() || 'unknown';
194 try {
195 return decodeURIComponent(segment);
196 } catch {
197 return segment;
198 }
199}
200
201/**
202 * Normalize Git hosting URLs to use raw file endpoints instead of web viewer URLs.

Callers 6

resolveImageRequestUrlFunction · 0.90
loadZipFromUrlFunction · 0.90
urlUtils.test.tsFile · 0.90
fetchManifestFileFunction · 0.90
fetchSplatUrlFileFunction · 0.90
fetchRemoteSplatFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected