couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hank Knight <hknight...@gmail.com>
Subject Re: CouchDB: Can a hierarchical URL structure be accomplished with unique documents?
Date Tue, 12 Nov 2013 20:45:41 GMT
Here is an example of an entire website run entirely from attachments
of a single document:

https://samplecouchpoweredsite.couchappy.com/site/www/zootemplate/index.html

It does not work so well when I add the attachments to unique documents:
https://samplecouchpoweredsite.couchappy.com/site2/zootemplate%2findex.html/zootemplate%2findex.html

The site can be managed here:
https://samplecouchpoweredsite.couchappy.com/_utils/

I would like for this to work like the first link but with each
attachment associated with a unique document.

Is this even possible?  If so, how?

Thanks.


On Sun, Nov 10, 2013 at 3:53 PM, Andy Wenk <andy@nms.de> wrote:
> On 10 November 2013 19:39, Jens Alfke <jens@couchbase.com> wrote:
>
>>
>> On Nov 10, 2013, at 7:05 AM, Hank Knight <hknight555@gmail.com> wrote:
>>
>> > I understand that it is inefficient to associate all attachment with a
>> > single document when creating a couch app.
>>
>> Only if they’re really, really huge. For a normal couchapp I don’t think
>> it would be a problem.
>>
>> > Is there a way to make these attachments available via the same URL
>> > but with each one belonging to an independent document
>>
>> I believe you can do that using a rewrite handler to change the incoming
>> URL. But I have never used those so I can’t tell you how they work.
>>
>
> see
> http://docs.couchdb.org/en/latest/api/ddoc/rewrites.html?highlight=rewrite#any--db-_design-ddoc-_rewrite-pathfor
> _rewrite
>
> --
> Andy Wenk
> Hamburg - Germany
> RockIt!
>
> http://www.couchdb-buch.de
> http://www.pg-praxisbuch.de
>
> GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588

Mime
View raw message