1function openDialog() { 2 document.getElementById('fileid').click(); 3 return document.getElementById('fileid').value; 4} 5 6window.downloadFileFromStream = async (fileName, contentStreamReference) => { 7 const arrayBuffer = await contentStreamReference.arrayBuffer(); 8 const blob = new Blob([arrayBuffer]); 9 const url = URL.createObjectURL(blob); 10 const anchorElement = document.createElement("a"); 11 12 anchorElement.href = url; 13 anchorElement.download = fileName ?? ""; 14 anchorElement.click(); 15 anchorElement.remove(); 16 URL.revokeObjectURL(url); 17} 18 19function triggerFileDownload(fileName, url) { 20 fetch(url, { 21 method: 'GET' 22 }).then(resp => resp.blob()) 23 .then(blob => { 24 const url = window.URL.createObjectURL(blob); 25 const a = document.createElement('a'); 26 a.style.display = 'none'; 27 a.href = url; 28 a.download = fileName; 29 document.body.appendChild(a); 30 a.click(); 31 window.URL.revokeObjectURL(url); 32 }) 33}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.