小编crt*_*tag的帖子

GAE 中 Node JS 项目中的 HTTP 413 请求实体太大

我在 GAE 上部署了我的后端应用程序。在其中,我有一个 API,它将文件上传到 GCS 存储桶。最近我尝试上传超过 50mb 的文件并得到413 Request entity too large

做了一些研究,发现问题出在ngnix. API 将提供413大于 32Mb 的任何文件。

找到一个解决方案,其中提到包含ngnix.conf文件并添加client_max_body_size 80M到其中。我这样做了,但仍然得到同样的错误。

这是我的ngnix-app.conf文件

server{
 location / {
        client_max_body_size       80m;
        client_body_buffer_size    512k;
  }
}
Run Code Online (Sandbox Code Playgroud)

有什么明显的东西让我错过了吗?

google-app-engine json nginx node.js body-parser

3
推荐指数
1
解决办法
5176
查看次数

标签 统计

body-parser ×1

google-app-engine ×1

json ×1

nginx ×1

node.js ×1