How to download coda generated file?

I have a coda page that generates a KML file for Google earth. I’d like to be able to download the file so that I can load it in Google earth.

My workaround for now is a button that copies the text into the clipboard and then manually paste it into the file.

Any better way?

Also it would be a bonus if I could deep link directly to launch the app with the contents of the file via protocol scheme.

Two things come to mind.

  1. You could create a view that contains a single field/row that contains the KML content and use the table CSV export feature.
  2. A more elegant solution is to create a custom pack that sends the content directly to the service that needs this data. Ideally, the service you POST it to could store into the system that needs this document. Or, it could be a service that allows the final system to retrieve it.

I generate a lot of GeoJSON data in Coda and use a custom pack to post it into a Firestore database and mapping apps then retrieve it from there.

1 Like

Only slightly better is with a dataurl. But Coda blocks data url links, so you can also only work with copy/paste.

Here is an example.
Click the button to copy the data url, then open a new tab and paste it into your browsers address bar. Hit enter and it should start a file download. In most browsers you can not predefine a filename thatway. You have to enter it during the download manually.

Coyp to clipboard does not work in the embed directly in the community! You need to “open in coda” to test it.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.