10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-26 06:14:38 +01:00

Fix an error when file is base64

This commit is contained in:
Mickaël Véril 2019-10-04 09:58:38 +02:00
parent d8c8458d55
commit a4f74b7f89

View File

@ -39,8 +39,8 @@ draft: false
} else if(key[1] in queryDic){ } else if(key[1] in queryDic){
var base64=queryDic[key[1]]; var base64=queryDic[key[1]];
btn_download=document.getElementById("btn_download"); btn_download=document.getElementById("btn_download");
btn_download.onclick=function(){ btn.btn_download.onclick=function(){
window.open(String.raw`data:application/pdf;base64,${Base64}`,"_self") window.open(String.raw`data:text/plain;base64,${base64}`,"_self")
} }
document.getElementById('fileTitle').hudden=true document.getElementById('fileTitle').hudden=true
document.getElementById('fileContent').innerText=atob(base64) document.getElementById('fileContent').innerText=atob(base64)