html5 saveAs support in google chrome

前端 未结 1 366
刺人心
刺人心 2020-12-30 06:57

I am trying to use saveAs interface as explained here

For the moment, I only worry about Google Chrome, and I uses latest Canary (Version 27.0.1429.0 ca

1条回答
  •  伪装坚强ぢ
    2020-12-30 07:33

    this is a polyfill, as explained in the article. You have to load the javascript file listed in the article, save it in your resources and link to it in your code: The repository is there: https://github.com/eligrey/FileSaver.js

    There are limitations in Chrome, though. If file already saved, the new saving name is incremented : myFile(1), then myFile(2), etc.

    I have now a bug on Chrome, which tells can it cannot OPEN the file, but it is just a false warning, as the file is well SAVED, which is the point.

    0 讨论(0)
提交回复
热议问题