apache / nano

Nano is now part of Apache CouchDB. Repo moved to https://GitHub.com/apache/couchdb-nano
https://github.com/apache/couchdb-nano
Other
1.13k stars 157 forks source link

db.attachment.get file- 'could not be opened because it is empty' #341

Closed themorganthompson closed 8 years ago

themorganthompson commented 8 years ago
db.attachment.get(id, file, function(err, body) {
        if (!err) {
          fs.writeFile(req.file.name, body);
        }
    });

Upon opening the newly-written file, I see an error message that says, "[filename] could not be opened because it is empty."

If I make an http.get request via Postman, I can see the image fine. If I look at the attachment in Cloudant, I can see the image fine.