How do I save image in couchbase lite in core java? As we save image in couchase server, we convert image to bytes and than save bytes. But its not having like that in couchbase lite. Kindly help me.
final BufferedImage image = ImageIO.read(new File(file.getPath()));
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ImageIO.write(image, "png", baos);
Document img_doc = db.getDocument("image");
Map<String, Object> img_properties = new HashMap<String, Object>();
img_properties.put("image", bytes);
img_doc.putProperties(img_properties);