Andrew Irwin Andrew Irwin - 1 year ago 125
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


Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download