Permalink
Browse files

Merge pull request #3 from dscape/master

Remove newlines from attachment content-types
  • Loading branch information...
2 parents 3f3d7fd + 8a301a2 commit 684dc86f62ce75dbd99d597dd531b7ada32f2a34 @maxogden committed Sep 13, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 plugins/couchdb.js
View
@@ -21,7 +21,7 @@ function attachment() {
return {
start: function(content_type, name) {
filename = name;
- doc._attachments[filename] = {content_type: content_type};
+ doc._attachments[filename] = {content_type: content_type.replace(/\n/g, " ")};
},
data: function(data) { bufs.push(data) },
end: function() { if(filename) doc._attachments[filename]['data'] = bufs.slice().toString('base64') },

0 comments on commit 684dc86

Please sign in to comment.