JS前端批量下载大文件并打包zip(StreamSaver.js)

官网地址

直接上demo代码,在官网demo基础上修改:



  
    
    Saving multiple files as zip
  
  
    

    

    
    
    
    
    
  

data.json文件:

[
	{
		"name" : "压力表证书.zip",
		"url" : "https://app.xxxxx.com/QMSstatic/AdjustRecord/yalibiaozhengshu_202009161801718.zip"
	},
	{
		"name" : "J20E 20.10.9.zip",
		"url" : "https://app.xxxxx.com/QMSstatic/PartAuditInfo/J20E 20_202010121428461.10.9.zip"
	},
	{
		"name" : "J20E 20.10.9.zip",
		"url" : "https://app.xxxxx.com/QMSstatic/AuditLedger/J20E 20_202010121428490.10.9.zip"
	}
]

测试了下,4G大小都可以下载

你可能感兴趣的:(javascript,vuejs,javascript,开发语言,ecmascript)