Detecting attachment updates

12 views
Skip to first unread message

parvez....@decurtis.com

unread,
Jun 1, 2017, 10:11:00 AM6/1/17
to Couchbase Mobile
At iOS end, for a deferred attachment download scenario, there is a document D1 with attachment (name "D1"). We have downloaded the attachment. If from another iOS application the attachment for that document D1 is changed but name is still same ("D1"). In this case how one can know that attachment is updated and we need to download it again  in the first iOS application?

Jens Alfke

unread,
Jun 1, 2017, 4:02:40 PM6/1/17
to Couchbase Mobile

On Jun 1, 2017, at 7:11 AM, parvez....@decurtis.com wrote:

At iOS end, for a deferred attachment download scenario, there is a document D1 with attachment (name "D1"). We have downloaded the attachment. If from another iOS application the attachment for that document D1 is changed but name is still same ("D1"). In this case how one can know that attachment is updated and we need to download it again  in the first iOS application?

The document will update (it’s impossible to change an attachment without creating a new document revision) and the entry for D1 in the top-level “_attachments" property will have a different “digest” property.

—Jens
Reply all
Reply to author
Forward
0 new messages