通过Postman上传文件比通过浏览器上传文件更快

时间:2020-05-19 14:27:59

标签: file-upload browser upload postman video-upload

我将同一视频文件(145 Mb大小)从同一台计算机上传到同一台服务器。上载是通过带有multipart / form-data的POST请求完成的。如果我使用Postman进行上传,则上传过程大约需要30秒。如果我是通过浏览器(经过测试的Chrome,FF,Safari)执行此操作的,则大约需要一分钟。

邮递员标题:

Cookie: __cfduid=d629ccab89f0d8996cbcd03fd85d7edad1588857074
Postman-Token: <calculated when request is sent>
Content-Type: multipart/form-data; boundary=<calculated when request is sent>
Content-Length: <calculated when request is sent>
Host: <calculated when request is sent>
User-Agent: PostmanRuntime/7.24.1
Accept: */*
Accept-Encoding: gzip, deflate, br
Connection: keep-alive

浏览器标题:

:authority: domain.com
:method: POST
:path: /file/add
:scheme: https
accept: application/json, text/plain, */*
accept-encoding: gzip, deflate, br
accept-language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7
cache-control: no-cache
content-length: 145506546
content-type: multipart/form-data; boundary=----WebKitFormBoundaryWWuN1xlu5NeYmSLR
origin: https://somedomain.com
pragma: no-cache
referer: https://somedomain.com/
sec-fetch-dest: empty
sec-fetch-mode: cors
sec-fetch-site: cross-site
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36

有人知道为什么通过浏览器上传需要花费两倍的时间吗?

0 个答案:

没有答案
相关问题