Short URL Service in TerriaJS #5071
-
TerriaJS seems to be using now discontinued Google URL shortening service in modles/GoogleURLShortener.js Does anyone have suggestions on how to implement a short URL in TerriaJS. Does one have to use alternative service like [lstu.fr] |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
You can use s3 or GitHub gist when creating share links for maps. See https://github.com/TerriaJS/terriajs-server/blob/master/serverconfig.json.example#L134-L169 This might be a good place to start, depending on your needs. |
Beta Was this translation helpful? Give feedback.
-
@arky We originally used Google URL shortener but our URLs got too long. At that point (a few years ago) we decided to instead save share data to JSON from |
Beta Was this translation helpful? Give feedback.
@arky We originally used Google URL shortener but our URLs got too long. At that point (a few years ago) we decided to instead save share data to JSON from
terriajs-server
and return a link that would allow reloading from that JSON. As Russell mentioned we support saving this JSON to Amazon S3 or GitHub Gist throughterriajs-server
out of the box. Additional providers should be fairly easy to add and we're happy to accept PRs toterriajs-server
adding support for other JSON storage solutions.