Reputation: 1251
I'm using 'PHP On Couch' plugin for accessing couchDB through php. And i don't know how to add multiple attachments to a document
$client = new couchClient($couch_dsn,$couch_db);
$doc = $client->getDoc('meantime');
$res1 = $client->storeAttachment($doc,'files/file1.html','text/html', 'file1.html');
$res2 = $client->storeAttachment($doc,'files/file2.html','text/html', 'file2.html');
Only one attachment is tied to document but not the second?
Upvotes: 0
Views: 538
Reputation: 41
revision id change every time you attach a file, so the second time there is a document update conflict, debug the response that will help you fix the problem
Upvotes: 4