Here’s a code snippet to add a blob in Android:
// Add a blob
ByteArrayInputStream inputStream = new ByteArrayInputStream(new byte[] {0, 0, 0, 0});
Blob blob = new Blob("application/octet-stream", inputStream);
// Add the blob to the Document
mutableDocument.setBlob("myblob", blob);
try {
// Save the document
database.save(mutableDocument);
} catch (CouchbaseLiteException e) {
Log.e("couchbaseevents", "Error creating database", e);
}
What’s the code to delete a blob later on please? I didn’t find it here: https://docs.couchbase.com/mobile/2.5.0/couchbase-lite-java/
Thanks!