【问题标题】:413 error in the sping-boot application deployed on google-app-enginegoogle-app-engine 上部署的 spring-boot 应用程序中出现 413 错误
【发布时间】:2018-08-10 07:45:54
【问题描述】:

我是基于 google-app-engine 部署的新手。我将我的 spring-boot 应用程序部署在 app-engine 上,并在上传较大的文件时得到 413。

@PostMapping(path = "/createProject", consumes = {"multipart/form-data"})
public @ResponseBody Project createProject(@RequestPart(value = "project") Project project, @RequestPart("files") List<MultipartFile> files) throws Exception {
....
}

谁能告诉我如何增加应用引擎配置中的默认媒体大小。

【问题讨论】:

    标签: java spring-boot google-app-engine


    【解决方案1】:

    根据documentation,Google App Engine 中的上传限制为 32MB,并且无法更改。如果您使用的是 GAE 标准,我建议您使用 resumable upload 进程向云存储发送请求。这个建议在this answer 中有更详细的解释。如果您使用 GAE Flex,您也可以尝试 this 替代方案,我从未测试过它,但它包括为 nginx 服务器自定义一个 nginx-app.conf file 文件。

    希望对您有所帮助! :))

    【讨论】:

      猜你喜欢
      • 2018-06-12
      • 2019-05-18
      • 2011-07-11
      • 2021-11-02
      • 1970-01-01
      • 2019-02-02
      • 2020-08-31
      • 2019-03-16
      • 1970-01-01
      相关资源
      最近更新 更多