Upload: OutOfMemory if stream already been read (#10096)

Added -1 check and test.

Change-Id: I3f6c61417353884d22d8e6b33ef21319475c1907