You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Aaron Reichman (JIRA)" <ji...@apache.org> on 2011/08/26 19:03:29 UTC

[jira] [Created] (COUCHDB-1261) Add KML and KMZ as default mime types

Add KML and KMZ as default mime types
-------------------------------------

                 Key: COUCHDB-1261
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1261
             Project: CouchDB
          Issue Type: Improvement
            Reporter: Aaron Reichman
            Priority: Minor


With the availability of the GeoCouch extension, I would like to see KML and KMZ added to main.js as default mime types for CouchDB.  Alternatively, a mechanism could be provided to allow organizations to easily add and maintain their own mime types without having to edit main.js, which will be overwritten on future updates to CouchDB.

The two lines that can be added to main.js are:

registerType("kml", "application/vnd.google-earth.kml+xml");
registerType("kmz", "application/vnd.google-earth.kmz");


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (COUCHDB-1261) Add KML and KMZ as default mime types

Posted by "Randall Leeds (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Randall Leeds closed COUCHDB-1261.
----------------------------------

    Resolution: Invalid

I think the proper way to handle this is by calling the function `provides()` from within your show or list handler which allows customizing the response based on the Accept header.

for example:

function (head, req) {
  provides("application/vnd.google-earth.kml+xml", function() {
    send(/*some KML data*/)
  }
}


> Add KML and KMZ as default mime types
> -------------------------------------
>
>                 Key: COUCHDB-1261
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1261
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Aaron Reichman
>            Priority: Minor
>
> With the availability of the GeoCouch extension, I would like to see KML and KMZ added to main.js as default mime types for CouchDB.  Alternatively, a mechanism could be provided to allow organizations to easily add and maintain their own mime types without having to edit main.js, which will be overwritten on future updates to CouchDB.
> The two lines that can be added to main.js are:
> registerType("kml", "application/vnd.google-earth.kml+xml");
> registerType("kmz", "application/vnd.google-earth.kmz");

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira