Alternative for 'download' attribute in Safari/iOS

前端 未结 3 1028
栀梦
栀梦 2020-12-14 18:08

I have a blob created with a base64, and I need to make this data downloadable as a pdf.

I created this snippet:

    var blob = new Blob([byte]);
            


        
3条回答
  •  庸人自扰
    2020-12-14 19:07

    As per the below link:-

    https://caniuse.com/#feat=download

    Safari 13 Beta 3 is released so you can check on the same, whether its working or not?

    You can download a blob got from a base64 by using a atob function.

    The atob function will decode a base64-encoded string into a new string with a character for each byte of the binary data.

    You can save blob locally via FileSaver.js .

    You can also check here that would be helpful:- How to open Blob URL on Chrome iOS

提交回复
热议问题