nrw/coffee-script-precompiler — comment on commit 95f8fabef3c2c3731afad7d7b6ad17f59fa86c00
File: src/compile.coffee line 54
By petebacondarwin:

Why did you add the toString("base64") back in? The attachments.add method does this already:

exports.add = function (doc, ddoc_path, original_path, content) {
if (!doc._attachments) {
doc._attachments = {};
}
doc._attachments[ddoc_path] = {
'content_type': mime.lookup(original_path),
'data': content.toString('base64'),
// custom addition removed in cleanup postprocessor
'_original_path': original_path
};
return doc;
};