Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 17284 invoked from network); 20 Mar 2010 23:31:10 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Mar 2010 23:31:10 -0000 Received: (qmail 40636 invoked by uid 500); 20 Mar 2010 23:31:09 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 40609 invoked by uid 500); 20 Mar 2010 23:31:09 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 40600 invoked by uid 99); 20 Mar 2010 23:31:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Mar 2010 23:31:09 +0000 X-ASF-Spam-Status: No, hits=-0.2 required=10.0 tests=AWL,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of 7zark7@gmail.com designates 209.85.210.198 as permitted sender) Received: from [209.85.210.198] (HELO mail-yx0-f198.google.com) (209.85.210.198) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Mar 2010 23:31:00 +0000 Received: by yxe36 with SMTP id 36so339933yxe.13 for ; Sat, 20 Mar 2010 16:30:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=sVPujOwm4ISTMPLLUJdQGiEKQECqbHGxxAC73YubFlE=; b=EpIt8w9I/HsJe/T2akQPKEevihnqWbB3CefqXwtwQUk6rR2PH2jD1onMjCmJVwb7RJ PkqCTa5U/yhKL+mN2bjnUp3mn2FQSx2sa+wF1DkxVjL6+OpSjQt/juwPBWKjoFUc1Ech 0svMeTzsdAgWQOb7P7p5/l8GPohzs/mVx46qA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=Gxl8DQtTQvzB3MLzB49UsPFDfcuc9WhqkoW03cy9iqkQps8u3CFlNftkI1jqQKTKgz Cr6m4Qn8mGBUzEHiYKT/8Aaougj64D6NbDIjbLeIzgHSwLD90DL5OxnPnAxDbsqveiiD Q6OyDXHKPDiMjZ0JSamiCh1dBg/kurjnZk3n4= Received: by 10.101.144.39 with SMTP id w39mr5708437ann.19.1269127839265; Sat, 20 Mar 2010 16:30:39 -0700 (PDT) Received: from NONA.local (pool-71-102-220-219.snloca.dsl-w.verizon.net [71.102.220.219]) by mx.google.com with ESMTPS id 16sm1904919gxk.9.2010.03.20.16.30.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 20 Mar 2010 16:30:38 -0700 (PDT) Message-ID: <4BA55A9B.9030802@gmail.com> Date: Sat, 20 Mar 2010 16:30:35 -0700 From: 7zark7 <7zark7@gmail.com> User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 MIME-Version: 1.0 To: user@couchdb.apache.org Subject: Attachment serving, directories Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, I'd like to use CouchDB for serving static files (images, css, scripts, etc.) The files and directory structure are not under my control, so the files may be nested under one or more directories. For example: /images/a.gif /images/home/logo.png /scripts/main.js /scripts/prototype/prototype.js etc. This works fine if I create top-level "directory" documents with ids such as: "images", "scripts", etc. 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.