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

Function downloadFile

src/utils/download.ts:32–38  ·  view source on GitHub ↗
(data: ArrayBuffer | string, filename: string)

Source from the content-addressed store, hash-verified

30}
31
32export function downloadFile(data: ArrayBuffer | string, filename: string): void {
33 const blob =
34 typeof data === 'string'
35 ? new Blob([data], { type: 'text/plain;charset=utf-8' })
36 : new Blob([data], { type: 'application/octet-stream' });
37 downloadBlob(blob, filename);
38}
39
40export function downloadUrl(url: string, filename: string): void {
41 const a = document.createElement('a');

Callers 1

download.test.tsFile · 0.85

Calls 1

downloadBlobFunction · 0.85

Tested by

no test coverage detected