The code above creates a temporal element and download a file.
function downloadFile(file) { var a = document.createElement("a"); a.