MCPcopy Create free account
hub / github.com/error311/FileRise / siblingPreviewUrl

Function siblingPreviewUrl

public/js/filePreview.js:626–637  ·  view source on GitHub ↗
(newName)

Source from the content-addressed store, hash-verified

624
625 // Use the same preview endpoint, just swap the "file" param.
626 function siblingPreviewUrl(newName) {
627 try {
628 const u = new URL(baseUrl, window.location.origin);
629 u.searchParams.set('file', newName);
630 // cache-bust so we don’t get stale frames
631 u.searchParams.set('t', String(Date.now()));
632 return u.toString();
633 } catch (e) {
634 // Fallback: go through generic download/inline endpoint
635 return buildPreviewUrl(folder, newName);
636 }
637 }
638
639 setTitle(overlay, name);
640 if (isSvg) {

Callers 3

navigateFunction · 0.85
setPdfSrcFunction · 0.85
setVideoSrcFunction · 0.85

Calls 2

buildPreviewUrlFunction · 0.85
setMethod · 0.80

Tested by

no test coverage detected