How to prompt save as option for user to download file using chrome?

前端 未结 2 1290
难免孤独
难免孤独 2020-12-22 07:58

I have method that is downloading file whenever this method called it is working as expected, I just see difference in browser in IE user has option to save As file but in c

2条回答
  •  伪装坚强ぢ
    2020-12-22 08:11

    Well, why dont you use regular confirm?

    if (confirm('Save As a File?')) {
    
       FileSaver.saveAs(blob, 'server.log');
    }
    

提交回复
热议问题