anchor.diff:  
                     case Attachment of
                       false -> echo(200, jiffy:encode({FileKVList}), Req);
  -                    _ -> %% TODO Support stremming mode
  +                    _ ->
                         CType = proplists:get_value(<<"ctype">>, FileKVList),
                         FileName = proplists:get_value(<<"filename">>, FileKVList),
   
  -                      case couch:fetch_attachment("user_uploads", FileKey, FileName) of
  -                        {ok, EncrResult} ->
  -
  -                          State = crypto:stream_init(aes_ctr, AESKey, AESIV),
  -                          {_, Result} = crypto:stream_decrypt(State, EncrResult),
  +                      case couch:fetch_attachment_stream("user_uploads", FileKey, FileName) of
  +                        {ok, StreamRef} ->
  +
  +                          EncrState = crypto:stream_init(aes_ctr, AESKey, AESIV),
  +
  +                          StreamFun = fun(SendChunk) ->
  +                            stream_send_file(SendChunk, StreamRef, EncrState, Req)
  +                          end,
  +                          Req2 = cowboy_req:set_resp_body_fun(chunked, StreamFun, Req),
   
                             cowboy_req:reply(200, [
                               {<<"content-type">>, CType},
                               {<<"server">>, <<"myinbox-datastore">>}
  -                          ], Result, Req);
  +                          ], Req2);
   
                           _ -> end_with_failure(404, "Not Found", Req)
                         end
  
positive.code:     {more, Body, Req2} ->
        {NewCryptoState, CipherBody} = crypto:stream_encrypt(CryptoState, Body),
        ok = couch:stream_attach(UploadRef, CipherBody),
        stream_file(Req2, UploadRef, NewCryptoState)
    end.
negative.code:             {ok, UploadRef} = couch:attach("user_uploads", FileKey, {Filename, stream}, Opts),
  
              %% commit upload
              {ok, {ResultList}, Req3, _} = stream_receive_file(Req2, UploadRef, CryptoState),
  
              Rev1 = proplists:get_value(<<"rev">>, ResultList),
              Id = proplists:get_value(<<"id">>, ResultList),
  