response header
HTTP/1.1 200 OK
Server: nginx/1.21.3
Date: Fri, 24 Dec 2021 06:19:29 GMT
Content-Type: application/zip
Transfer-Encoding: chunked
Connection: keep-alive
X-RateLimit-Remaining: 0
X-RateLimit-Requested-Tokens: 1
X-RateLimit-Burst-Capacity: 1
X-RateLimit-Replenish-Rate: 1
Content-Disposition: attachment; filename=%E6%8A%BD%E6%A0%B7%E7%BB%93%E6%9E%9C.zip
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Referrer-Policy: no-referrer
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: *
Access-Control-Allow-Headers: DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization
现在是等文件传完了,chrome 底部才出文件下载完成
如果实在做不到就只能自己监听进度写进度条了
1
sunjiayao 2021-12-24 15:44:16 +08:00
response header 加下 Content-Length 试试
|
2
coderluan 2021-12-24 15:45:23 +08:00
你得加个 Content-Length 或者 Content-Disposition 加个 size 吧,要不肯定不知道进度啊,哪怕你自己监听也得加吧。
|
5
sunjiayao 2021-12-24 15:58:22 +08:00
可以随便写 写大点 单位是字节
|