incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hahn <>
Subject Re: the fastest way to upload attachments
Date Tue, 21 Aug 2012 04:03:56 GMT
I don't know if this will be helpful, but this is what I do using nginx and
node.  It is efficient and easy.

I use nginx to upload the file and proxy the upload to node.  Nginx waits
until the file is uploaded and then sends a request to node that just has
the file location on the disk.  Then I use nano to attach the file to couch.

Even if you upload the file some other way, I highly recommend nano.  One
nano command does the attachment ...

    fs.createReadStream(filePath).pipe(nano.attachment.insert  id,
attachmentName, null, ...

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message