public override Stream GetStream(HttpContent parent, HttpContentHeaders headers) { if (parent == null) { throw new ArgumentNullException("parent"); } if (headers == null) { throw new ArgumentNullException("headers"); } string fileName = this.GetFileName(headers); var fileItem = fileSystem.CreateFile(this.FolderItem, fileName, Stream.Null); this.Files.Add(new FileDataModel(fileItem.Name, fileItem.RelativePath, fileItem.WebUrl)); return(fileSystem.WriteFileAsync(fileItem, this.BufferSize)); }