You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Nick North <no...@gmail.com> on 2013/08/03 23:36:21 UTC

Attachment replication

If I create a document with attachments in a single HTTP call, either
inline or in MIME format, does it all replicate as a single unit, or do the
attachments replicate separately? I'd like to know that, if the document
turns up in the changes field of a replica, then both the document and the
attachments can be requested immediately. Thanks for your help,

Nick North

Re: Attachment replication

Posted by Nick North <no...@gmail.com>.
Perfect - thank you. For any future readers of this, my original question should have referred to the changes "feed" rather than "field" of course.

Nick

On 4 Aug 2013, at 01:52, Adam Kocoloski <ad...@gmail.com> wrote:

> Yes, the system provides that guarantee. Some versions of CouchDB transfers the attachments in separate requests, but when the doc is in the target's _changes you can be assured that all of its attachments have made the trip.  Cheers,
> 
> Adam
> 
> On Aug 3, 2013, at 5:36 PM, Nick North <no...@gmail.com> wrote:
> 
>> If I create a document with attachments in a single HTTP call, either
>> inline or in MIME format, does it all replicate as a single unit, or do the
>> attachments replicate separately? I'd like to know that, if the document
>> turns up in the changes field of a replica, then both the document and the
>> attachments can be requested immediately. Thanks for your help,
>> 
>> Nick North

Re: Attachment replication

Posted by Adam Kocoloski <ad...@gmail.com>.
Yes, the system provides that guarantee. Some versions of CouchDB transfers the attachments in separate requests, but when the doc is in the target's _changes you can be assured that all of its attachments have made the trip.  Cheers,

Adam

On Aug 3, 2013, at 5:36 PM, Nick North <no...@gmail.com> wrote:

> If I create a document with attachments in a single HTTP call, either
> inline or in MIME format, does it all replicate as a single unit, or do the
> attachments replicate separately? I'd like to know that, if the document
> turns up in the changes field of a replica, then both the document and the
> attachments can be requested immediately. Thanks for your help,
> 
> Nick North