Programming/web 관련
javascript 배열을파일로 저장하기
구차니
2023. 8. 2. 14:52
blob 으로 하면 저장은 되는데, 옵션을 주어서 파일 유형을 골라줘야 할 듯.
arr = [1,2,3,4,5,100] (6) [1, 2, 3, 4, 5, 100] var blob = new Blob(arr) window.open(URL.createObjectURL(blob)) |
url에 blob이 붙어서 신기하네
[링크 : https://blog.naver.com/nan17a/222058843806]
var aFileParts = ['<a id="a"><b id="b">hey!</b></a>']; var oMyBlob = new Blob(aFileParts, {type : 'text/html'}); // the blob window.open(URL.createObjectURL(oMyBlob)); |
[링크 : https://stackoverflow.com/questions/13405129/create-and-save-a-file-with-javascript]