Closed mikeedwards83 closed 8 years ago
Correct. The GetBlobStreamCommand
doesn't recreate the stream:
public virtual Stream GetBlobStream(Guid blobId)
{
return this.Blobs.ContainsKey(blobId) ? this.Blobs[blobId] : null;
}
Can you please share your entire test so I could quickly reproduce and then see how best to fix it?
Thanks for reporting this, guys. Returning a copy of the stream allows to get an open stream every time it's requested. That is exactly what you need, I'll push an update.
Fixed in v1.2.1.
Assume the following code:
If you do this against Sitecore then the code succeeds but with fake DB it fails on the data1.Read because the stream is closed. I assume this caused because SC returns a new stream on each call to GetBlobStream but FakeDB returns the same stream.