Last active
December 12, 2015 09:48
-
-
Save drsm79/4753925 to your computer and use it in GitHub Desktop.
CouchDB attachments by content type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function(doc) { | |
if (doc._attachments){ | |
for (a in doc._attachments){ | |
emit(doc._attachments[a].content_type, 1); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment