Fixed #23911 -- Added support for buffer file uploads in the test client

This patch renders the use of NamedTemporaryFile for file upload testing unnecessary
just to clarify: Added test client support for file uploads with file-like objects.