BIG-IP Edge Client - Proxy server received an invalid response from an upstream server

We have an intranet app that allows a user to attach a file to their request. It works fine for files up to 1 or 2 Meg or so. But larger files return an error: Bad Gateway The proxy server received an invalid response from an upstream server. When connected to our intranet locally, that is, not via BIG-IP, the app works fine, huge files can be uploaded with no problem.