public function openUploadStream($filename, array $options = [])
{
$options += ['chunkSizeBytes' => $this->options['chunkSizeBytes']];
$path = $this->createPathForUpload();
$context = stream_context_create([self::$streamWrapperProtocol => ['collectionWrapper' => $this->collectionWrapper, 'filename' => $filename, 'options' => $options]]);
return fopen($path, 'w', false, $context);
}