Save binary data

Not sure this is a UI problem or I am saving the objects incorect in the DB, but I remember that a binary data in the UI in an older version of Couchbase (Version 6.6) would return a message saying is a binary data when I was looking at the Document.

Now, for some reason if I look at the meta of a binary data I am getting this message:

  "meta": {
    "id": "0007e672-5a16-471f-9ae9-e2cde4fc6098",
    "rev": "1-173228d5a3a300000000000000000000",
    "att_reason": "invalid_json",
    "expiration": 0,
    "flags": 0,
    "type": "base64"
  "xattrs": {}

am I doing something wrong when I save the data or this is just a new functionality of the Couchbase UI?


That looks like a UI issue. It should have datatype=“raw”

    MutationResult mutationResult = collection.upsert(id, "this is a test".getBytes(), upsertOptions().transcoder(RawBinaryTranscoder.INSTANCE));
    Object o = collection.lookupIn( id, Collections.singletonList( LookupInSpec.get("$document.datatype").xattr()));
    System.err.println("o = "+o);

o = LookupInResult{encoded=[SubdocField{status=SUCCESS, value=["raw"], path='$document.datatype'}], cas=0x1736eafedf230000, isDeleted=false}

I asked Engineering to look into this.