Programming/web 관련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]

'Programming > web 관련' 카테고리의 다른 글

chart.js multi y axis  (0) 2023.09.27
웹 브라우저 10080 포트 접근 차단 이유  (0) 2023.08.03
Canvas2D: Multiple readback operations using getImageData  (0) 2023.07.24
webGPU  (0) 2023.05.18
chart.js log 스케일  (0) 2023.03.31
Posted by 구차니