public function createFileFromContentAsync(
        $share,
        $path,
        $content,
        CreateFileFromContentOptions $options = null
    ) {
        $stream = Psr7\stream_for($content);
        $size = $stream->getSize();

        if ($options == null) {
            $options = new CreateFileFromContentOptions();
        }

        //create the file first
        $promise = $this->createFileAsync($share, $path, $size, $options);

        //then upload the content
        $range = new Range(0, $size - 1);
        $putOptions = new PutFileRangeOptions($options);
        $useTransactionalMD5 = $options->getUseTransactionalMD5();
        if ($size > Resources::MB_IN_BYTES_4) {
            return $promise->then(function ($response) use (
                $share,
                $path,
                $stream,
                $range,
                $putOptions,
                $useTransactionalMD5
            ) {
                return $this->multiplePutRangeConcurrentAsync(
                    $share,
                    $path,
                    $stream,
                    $range,
                    $putOptions,
                    $useTransactionalMD5
                );
            }, null);
        } else {
            return $promise->then(function ($response) use (
                $share,
                $path,
                $stream,
                $range,
                $putOptions
            ) {
                return $this->putFileRangeAsync(
                    $share,
                    $path,
                    $stream,
                    $range,
                    $putOptions
                );
            }, null);
        }
    }