How to rename or keep the file name only while downloading the file entering a required key?

See my below code. It’s working fine but while downloading a file by entering the required key, the file name changed and it’s downloading with the whole domain name + directory + file name. But I want just the file name. Code : //This is the HTML part. <center> <input class="keyBox" style="padding : 10px; padding-left:15px;… Read More How to rename or keep the file name only while downloading the file entering a required key?

Cannot get child element from parsed XML javascript (google script)

I am trying to get child node, but it prints null. My code: function findFile(ICO){ var fileName = ICO + ‘.xml’; const folderFiles = DriveApp.getFolderById(‘folderID’).getFiles(); while (folderFiles.hasNext()) { var folderFile = folderFiles.next(); if(folderFile.getName() == fileName){ return folderFile.getId(); break; } } } function filesearch(ICO){ var fileId = findFile(ICO); var fileFound = DriveApp.getFileById(fileId).getBlob().getDataAsString(); var rawXml = XmlService.parse(fileFound);… Read More Cannot get child element from parsed XML javascript (google script)

Javascript download BLOB as PDF

I am trying to convert a blob object to a pdf and download it. So far I’ve tried the following: var downloadLink = document.createElement(‘a’); downloadLink.target = ‘_blank’; downloadLink.download = ‘name_to_give_saved_file.pdf’; // convert downloaded data to a Blob var blob = new Blob([file.$binary], { type: ‘application/pdf’ }); // create an object URL from the Blob var… Read More Javascript download BLOB as PDF