Client: Check for error when fread'ing a stream.
examples/upload-file: Allow data source to be a URL

PHP has built-in support for reading from certain URLs as streams, so
just use that.
test: Test chunked uploads when passing in an overall size.