'; axios.post(App.api_base + '/export_content/', { params: { type: type, title: report['title'], data: html, files: JSON.stringify( files ) } }, { headers: { 'X-Vuedoo-Domain': App.domain, 'X-Vuedoo-workspace' : workspace, 'X-Vuedoo-workspace-host' : host } }) .then((res) => { if( res.data.status == 'success' ) { window.location.href = App.base + '/download/?file=' + res.data.file + '&delete=true'; } $('#download_button').removeClass('loading'); }).catch((e)=>{ console.log(e); }); } }) .catch((error) => { console.log(error); }); function remote_to_local_filename( filename, type ) { var br = filename.split('?')[0].split('/'); if( type == 'html' ) { return 'images/' + br[ br.length - 1 ]; } else return filename; } }