Let me rephrase the question:

Are there any CouchDB 0.10 mechanisms (views, show function, etc) which allows me to serve a binary attachment that has one or more '/' characters in the requested file id?

I do not care about the url prefix or its length. In other words, these prefixes are all acceptable:

http://example.com:5984/some_db/{my file path here}
http://example.com:5984/some_db/_design/file/_show/{my file path here}
etc

What I do care about is that a browser can directly request a binary file such as "/scripts/main/common.js", without our having to go into hundreds of HTML files to rename these file references to "%2Fscripts%2Fmain%2Fcommon.js". Nor do I want an app server or Apache in place simply to do a file name translation.


The specific value proposition that CouchDB offers in this case is that it replaces:

1) Content distribution to multiple nodes in our network.
2) Replaces an app server/Apache serving static content.
3) It is highly concurrent.

Does anyone have experience doing the above or similar?

I can write a blog post if email is not conveying my question correctly.


Thanks


On 3/20/10 7:22 PM, John Merrells wrote:

On Mar 20, 2010, at 4:44 PM, 7zark7 wrote:

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.

How about serving the static content directly from the disk with a webserver
like apache or nginx....

If you really want the content in couch, then you could do the url rewrite with
some rules in the webserver config...

Or use a reverse proxy like varnish.... or squid if you're feeling brave.... and
then the content could be in couch for versioning, but served fast from the
cache.

John


Reply via email to