Storing blobs in Dgraph

On dgraph’s side, data is data so there wouldn’t be any read/write difference. There will be slightly more data to handle because base 64 is less compact than raw bytes, but this wouldn’t matter for most use cases.

In fact if you use the Go client, it will convert any []byte fields in your objects into base64 encoded strings automatically for you and do the opposite conversion when you retrieve those edges (we get this for free because this behaviour is baked into json - The Go Programming Language).

3 Likes