> On Jun 14, 2015, at 7:29 PM, Brendan Duddridge <[email protected]> wrote: > > Interesting. So if I allow the user to say, double-click on an attachment to > view it in Preview (for say a PDF file), then they make a change to the file > such as mark it up and then save it, what would happen in CBL?
Bad things. CBL would still think it was the old attachment, even though its content no longer matches the digest in its filename. If it got pushed to a server or peer, the revision would contain the updated file even though it didn’t appear to be a new revision. > A user could theoretically just navigate directly to the file and edit it > too. I couldn't stop that from happening. That’s why you should never expose these files to the user, including by allowing other apps to open them as documents. > Would the sync system still push an update to the gateway with the changes? No. CBL would have no idea that the file had changed. They’re supposed to be immutable. > Also, can you have multiple attachments with the same name? In different documents, sure. Within a document, the attachment name is a key in a dictionary so it has to be unique. —Jens -- 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/849C3D8A-7560-4320-9FB1-F1C91B3D7382%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
