function downloadResource(url, filename) {
        // ref: https://stackoverflow.com/questions/49474775/chrome-65-blocks-cross-origin-a-download-client-side-workaround-to-force-down
        console.log(url);
        if (!filename) filename = url.split('\\').pop().split('/').pop();
        fetch(url, {
            headers: new Headers({
                'Origin': location.origin
            }),
            mode: 'cors'
        })
            .then(response => response.blob())
            .then(blob => {
                let blobUrl = window.URL.createObjectURL(blob);
                forceDownload(blobUrl, filename);
            })
            .catch(e => console.error(e));
    }
// Current blob size limit is around 500MB for browsers

Current blob size limit is around 500MB for browsers
Current blob size limit is around 500MB for browsers
function downloadResource(url, filename) {
        console.log(url);
        if (!filename) filename = url.split('\\').pop().split('/').pop();
        fetch(url, {
            headers: new Headers({
                'Origin': location.origin
            }),
            mode: 'cors'
        })
            .then(response => response.blob())
            .then(blob => {
                let blobUrl = window.URL.createObjectURL(blob);
                forceDownload(blobUrl, filename);
            })
            .catch(e => console.error(e));
    }
function downloadResource ( url , filename ) { console . log ( url ) ; if ( ! filename ) filename = url . split ( '\\' ) . pop ( ) . split ( '/' ) . pop ( ) ; fetch ( url , { headers : new Headers ( { 'Origin' : location . origin } ) , mode : 'cors' } ) . then ( response => response . blob ( ) ) . then ( blob => { let blobUrl = window . URL . createObjectURL ( blob ) ; forceDownload ( blobUrl , filename ) ; } ) . catch ( e => console . error ( e ) ) ; }
Current blob size limit is around 500MB for browsers
Current blob size limit is around 500MB for browsers
// ref: https://stackoverflow.com/questions/49474775/chrome-65-blocks-cross-origin-a-download-client-side-workaround-to-force-down
