Andrew Irwin Andrew Irwin - 4 months ago 47
JSON Question

How do I get couchdb attachment name

How do I get the name of a couchdb attachment if I only know the document name.
Do I have to filter the return document json and extract the attachment name,
so I can then append it to the end of the url /db/doc/aboutme.jpg



You can either get your document with the attachments using the attachments query parameter.

Also, you can do as you described. You fetch the document. Then, you get your attachment by using the attachment name in the document.