Hello!
We are trying to migrate from Couchbase Lite 1.4 to more modern Couchbase Lite 2.8.
My experiments shows that in CBL 1.4 we got following attchment structure on server:
“_attachments”:{“imageAttachment”:{“content_type”:“image/jpeg”,“digest”:“sha1-J6kxplV+IjWE/OC1MWHjmC2PFjs=”,“length”:616251,“revpos”:3,“stub”:true}}
But in CBL 2 when I use method call:
doc.setBlob(“imageAttachment”, blob)
I got following:
"attachments":{"blob_/imageAttachment":{“content_type”:“image/jpeg”,“digest”:“sha1-1u4KKfNQWSqr+WnWLzZQbRl+QBM=”,“length”:616254,“revpos”:4,“stub”:true}}
My database got a lot of old CBL 1.4 images, imageAttachment name was hard coded in the API (since its a constant)
Now when I move to CBL 2 my backend cannot display CBL 2 photos since prefix blob_/ was added.
Is it possible to get rid of this prefix?
P.S.: Btw passing attachment name as a workaround is possible, but will require to add additional document fetch by id from couchbase to get attachment name. Seems like overhead for me.