Cloud Endpoint - 不接受多部分文件
Cloud Endpoint - Not accepting Multipart file
我使用 Cloud Endpoints 公开了 30 多个方法。简而言之,除了我有以下规范的 2 种方法外,所有方法都完美无缺
我在 yaml 中用粗体标记了出现问题的特定部分。如果我删除,文件将被正确解析和部署。
请参考从 --> 开始的最后 4 行:"formData"
post:
tags:
- "Companies"
description: "Add a new company"
operationId: "addCompany"
consumes:
- multipart/form-data
parameters:
- in: "formData"
name: "name"
description: "name of the company"
type: "string"
- in: "formData"
name: "map"
description: "map of the company (JSON)"
type: "string"
required: true
- in: "formData"
name: "hardnesses"
description: "list of hardnesses seperate by semicolon ;"
type: "string"
- in: "formData"
name: "file"
description: "Company logo"
type: "file"
这意味着我无法上传文件吗?
感谢您的宝贵意见。
(问题在 Github: https://github.com/GoogleCloudPlatform/java-docs-samples/issues/1392 )
Google Cloud Endpoints 当前不支持 "file".
类型的参数
我使用 Cloud Endpoints 公开了 30 多个方法。简而言之,除了我有以下规范的 2 种方法外,所有方法都完美无缺
我在 yaml 中用粗体标记了出现问题的特定部分。如果我删除,文件将被正确解析和部署。
请参考从 --> 开始的最后 4 行:"formData"
post:
tags:
- "Companies"
description: "Add a new company"
operationId: "addCompany"
consumes:
- multipart/form-data
parameters:
- in: "formData"
name: "name"
description: "name of the company"
type: "string"
- in: "formData"
name: "map"
description: "map of the company (JSON)"
type: "string"
required: true
- in: "formData"
name: "hardnesses"
description: "list of hardnesses seperate by semicolon ;"
type: "string"
- in: "formData"
name: "file"
description: "Company logo"
type: "file"
这意味着我无法上传文件吗?
感谢您的宝贵意见。
(问题在 Github: https://github.com/GoogleCloudPlatform/java-docs-samples/issues/1392 )
Google Cloud Endpoints 当前不支持 "file".
类型的参数