FileCodeBox icon indicating copy to clipboard operation
FileCodeBox copied to clipboard

大文件上传问题

Open liyown opened this issue 9 months ago • 6 comments

Describe the bug 在设置了 client_body_timeout 300s; client_max_body_size 1024m; 之后还是会上传失败,具体表现是卡在100%很久,然后后显示上传失败,但是不通过代理可以正常上传。 真的找不到原因了,请求协助 To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context Add any other context about the problem here.

liyown avatar May 07 '24 10:05 liyown

如果不加代理可以正常上传的话,还是需要检查反代那块的配置

vastsa avatar May 07 '24 12:05 vastsa

主要是设置我标的那两个吧,还有什么配置会影响吗,我其他配置都是默认的

liyown avatar May 07 '24 12:05 liyown

我刚刚发现,其实文件已经上传到服务端了,我在后台可以看到,但是前端显示上传失败 image 这是不是后端关闭了连接,浏览器控制台提示错误为: POST https://liuyaowen.club/share/file/ net::ERR_CONNECTION_CLOSED 难道反向代理会影响响应吗?

liyown avatar May 07 '24 14:05 liyown

我排查出问题了,我把文件扩展名字改成.txt就没有问题,同样的文件,.apk就无法返回取件码 image

liyown avatar May 07 '24 15:05 liyown

收到,我检查一下

vastsa avatar May 08 '24 16:05 vastsa

收到,我检查一下

APK,还有zip压缩包这些也不行。

正常的文本txt、视频等是可以上传的。

Mydong avatar May 12 '24 05:05 Mydong