feat(string2fileDload): adjust download config

This commit is contained in:
dancingCycle 2022-06-15 07:13:31 +02:00
parent ca1bd36a0f
commit 9d343318c1
1 changed files with 6 additions and 1 deletions

View File

@ -7,7 +7,12 @@ function Download(){
let inputValue=null;
if(typeof inputElem !== 'undefined' && inputElem !== null) {
inputValue=inputElem.value;
const file = new Blob([inputValue], {type: 'text/plain'});
const file = new Blob(
[inputValue],
{
type:'text/plain;charset=utf-8'
}
);
element.href = URL.createObjectURL(file);
element.download = "dloadFile.csv";
document.body.appendChild(element);