Media constructor
Creates a new Media with a byte stream of length length with a contentType.
When uploading media, length can only be null if ResumableUploadOptions is used.
Implementation
Media(this.stream, this.length,
{this.contentType = 'application/octet-stream'}) {
if (length != null && length! < 0) {
throw ArgumentError('A negative content length is not allowed');
}
}