Open AnandThurubatla opened 7 months ago
Hello Anand,
You could start here:
"endpoint": "/some-file-upload",
"method": "POST",
"output_encoding": "no-op",
"input_headers": ["*"],
"backend": [
{
"url_pattern": "/service/some-file-upload",
"encoding": "no-op",
"method": "POST",
"host": ["http://yourmicorservice"]
}
]
}
Notice the no-op
because you don't want KrakenD to encode/decode, and also the input_headers
because most microservices rely on specific headers for file upload. Use this until you are certain of which ones you need.
Share logs for further help
Yes, no-op
is the solution.
look, this is how I configured one of my endpoints
{
"endpoint": "/v2/profile/upload-image",
"method": "POST",
"input_headers": [ "Content-Type", "Authorization", "Accept-Language" ],
"input_query_strings": [ ],
"output_encoding": "no-op",
"backend": [
{
"host": [ "{{ .urls.profile.kube_host_url }}" ],
"url_pattern": "/profile/upload-image",
"method": "POST",
"encoding": "no-op",
"extra_config": { "backend/http": { "return_error_code": true } }
}
],
"extra_config": {
{{ template "jwt_validator.tmpl" .env.user }}
}
}
Hello Community Members,
We have been using KrakenD as API Gateway for our Micro-Services. One of our micro-service handles Image upload. We tried in ways to configure KrakenD to support upload Image in Base64 format and binary but no luck. Not found any references too.
Can some one share KrakenD configuration which supports Image upload?
Thanks, Anand