Download blobs locally using Safari

后端 未结 6 1681
没有蜡笔的小新
没有蜡笔的小新 2020-12-04 21:36

I\'m trying to find a cross browser way to store data locally in HTML5. I have generated a chunk of data in a Blob (see MDN). Now I want to move this Blob to the actual file

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-04 22:18

    The file name sucks, but this works for me in Safari 8:

            window.open('data:attachment/csv;charset=utf-8,' + encodeURI(csvString));
    

    UPDATE: No longer working in Safari 9.x

提交回复
热议问题