Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Avoiding unnecessary copying

  • Loading branch information...
commit 15e707dc4c6bf168fb72ec7ad38b3c78f02722ce 1 parent 44c4d45
@ayende ayende authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 Raven.Client.Lightweight.FSharp/Raven.fs
View
5 Raven.Client.Lightweight.FSharp/Raven.fs
@@ -42,10 +42,9 @@ open Newtonsoft.Json
let createAttachment documentId data metaData (a : IDocumentSession) =
putAttachment documentId (Nullable()) data metaData a
- let getAttachmentAsStream<'a> documentId (stream : IO.Stream) (a : IDocumentSession) =
+ let getAttachmentAsStream<'a> documentId (a : IDocumentSession) =
let attachment = a.Advanced.DatabaseCommands.GetAttachment(documentId)
- let attachmentBody = attachment.Data.Invoke().CopyTo(stream)
- (attachment.Metadata.JsonDeserialization<'a>(), attachment.Etag)
+ (attachment.Metadata.JsonDeserialization<'a>(), attachment.Etag, attachment.Data.Invoke())
let getAttachmentAsBytes<'a> documentId (a : IDocumentSession) =
let attachment = a.Advanced.DatabaseCommands.GetAttachment(documentId)
Please sign in to comment.
Something went wrong with that request. Please try again.