如何解决将内容处理参数添加到 AWS PROXY
几天前我在 Serverless forum 上问过这个问题,但没有收到回复,所以我想在这里试试。
我正在构建一个返回 PDF 的无服务器函数。在我的活动配置中(从打字稿启动器修改):
export default {
handler: `${__dirname.split(process.cwd())[1].substring(1)}/handler.main`,events: [
{
http: {
method: "post",path: "generateForm",request: {
contentHandling: <const>"CONVERT_TO_BINARY",schema: {
"application/json": schema,},],};
部署时出现错误:
Warning! You’re using the AWS_PROXY in combination with a request configuration in your function “generateForm”. Only the request.parameters,request.schema configs are available in conjunction with AWS_PROXY. Serverless will remove this configuration automatically before deployment.
但是在测试时它似乎正确返回了二进制文件。我可以安全地忽略此错误吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。