couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 7zark7 <>
Subject Attachment serving, directories
Date Sat, 20 Mar 2010 23:30:35 GMT

I'd like to use CouchDB for serving static files (images, css, scripts, 

The files and directory structure are not under my control, so the files 
may be nested under one or more directories.  For example:



This works fine if I create top-level "directory" documents with ids 
such as:

and then upload attachments to these.

However, I then lose the benefits of a single doc per file, such as 
per-file metadata, revision info, etc.  The "directory" document 
revision also changes each time any attachment is modified.  I would 
like to use this info to determine what to upload, update, and/or remove 
from Couch when the file system changes.

Is there a way to have a unique document per file, which *also* allows 
Couch to directly serve web requests for the original directory 
structure and file names.  (e.g. "/scripts/main.js")

I do not want to have another webapp "in front" of Couch to translate a 
request for "/scripts/main.js" into "%2fscripts%2fmain.js/data", or 
"/a1b0e2349f53456/scripts/main.js", etc.

Thank you for the help.

View raw message