Uploaded file gets corrupted when using GRPC custom middleware in tyk-gateway 2.7.0

Can you share the verbose output of your Curl command?

I suggest you check the length of the incoming body:

console.log("body.length is", response.request.body.length)
console.log("raw_body.length is", response.request.raw_body.length)