I am using PostgreSQL on a Laravel installation. A table has a bytea type field which is being used to store binary data (base64_encoded file contents).
When I use
The answer was to use stream_get_contents on the stream. duh.