feat(string2fileDload): adjust download config
This commit is contained in:
parent
ca1bd36a0f
commit
9d343318c1
|
@ -7,7 +7,12 @@ function Download(){
|
||||||
let inputValue=null;
|
let inputValue=null;
|
||||||
if(typeof inputElem !== 'undefined' && inputElem !== null) {
|
if(typeof inputElem !== 'undefined' && inputElem !== null) {
|
||||||
inputValue=inputElem.value;
|
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.href = URL.createObjectURL(file);
|
||||||
element.download = "dloadFile.csv";
|
element.download = "dloadFile.csv";
|
||||||
document.body.appendChild(element);
|
document.body.appendChild(element);
|
||||||
|
|
Loading…
Reference in New Issue