Hi There,
Why android CBL is creating two revisions when creating new/update document
with attachments?
OR
How we can create document long with attachment at the same time make sure
that should have one revision?
*More Details :*
This is way of i'm creating document
Document auditDocument = couchDataBase.createDocument();
auditDocument.putProperties(auditCreateAndUpdate.createAndUpdate(edAudits
));
Opps: Here document is creating one revision
*Here i'm updating the attachments to above document*
UnsavedRevision uploadAttachments = *null*;
Document document;
*try*{
uploadAttachments = auditDocument.getCurrentRevision().createRevision();
}*catch*(Exception ex){
document = auditDocument;
*return*;
}
Bitmap signatureBitmap = edAuditSignature.getBitmapSignatureImage();
ByteArrayOutputStream bos = *new* ByteArrayOutputStream();
signatureBitmap.compress(Bitmap.CompressFormat.*PNG*, 0, bos);
*byte*[] bitmapdata = bos.toByteArray();
*try* {
uploadAttachments.setAttachment(edAuditSignature.getSignatureImageName(),
"image/png", *new* ByteArrayInputStream(bitmapdata));
uploadAttachments.save(*true*);
} *catch* (Exception e1) {
e1.printStackTrace();
}
Opps: Here also document is creating one more revision
So that for single document it is creating two revision but
ios/ipad(Objective-c) creating only one revision for both cases
How we can solve this problem?
Thank's
--
You received this message because you are subscribed to the Google Groups
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/mobile-couchbase/0c0cc89d-223e-4afd-b98a-ed17d8a8d38c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.