Content length is mandatory while uploading to Azure using JClouds portable Blob Store API
BindAzureBlobMetadataToRequest class checks that content length is specified and is greater than zero in lines 58-59. However, according to the Azure SDK documentation, Azure CloudBlockBlob also accepts -1 if content length is unknown:
length - A long which represents the length, in bytes, of the stream data, or -1 if unknown.
We have a use case when we need to stream a big chunk of data of unknown size directly into a cloud storage. Portable JClouds API allows to upload files into OpenStack SWIFT without specifying their size, but it fails on Azure.