使用 WSO2 API 管理器上传多部分表单数据文件? [英] Multipart form data file upload using WSO2 API manager?

查看:31
本文介绍了使用 WSO2 API 管理器上传多部分表单数据文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有上传文件的休息服务,它工作正常.现在我在 API 管理器中创建了 API,并提供了与生产端点相同的文件上传服务.但是现在我在使用 API 管理器端点上传文件时在我支持的服务器中遇到错误.

I have rest service to upload files and it is working fine.Now I created API in API manager and also given the same file upload service as the production endpoint. But now I am getting an error in my backed server while uploading the file using API manager endpoint.

推荐答案

我得到了解决方案,需要在axis2.xml 文件中启用Binary Relay builders 以使用multipart/form-data 消息格式并确保没有带有处理多部分数据请求的自定义标头.

I got the solution,Need to enable Binary Relay builders in axis2.xml file to use the multipart/form-data message formatting and also ensure that there is no custom header with request to handle multipart data.

 <messageBuilder contentType="multipart/form-data"
                class="org.wso2.carbon.relay.BinaryRelayBuilder"/>

  <messageFormatter contentType="multipart/form-data"
                class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>

这篇关于使用 WSO2 API 管理器上传多部分表单数据文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆