Retrieve state from a JSON file I've pointed to #759
Closed
chourroutm
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
This already works.. https://neuroglancer-demo.appspot.com/#!gs:/mybucket/mystate.json i will add this to the doc. Your GitHub link won’t work because that url is to a GitHub page and not directly to the json, but the static raw URL would or if it were published via GitHub pages |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Our anti-phishing tool for emails usually breaks very long URLs and link shorteners also usually have character limits, as mentioned in https://caveconnectome.github.io/sections/users-interactive.html#neuroglancer-stateslinks
I am aware of the link shortener embedded in https://spelunker.cave-explorer.org/ (https://caveconnectome.github.io/sections/users-interactive.html#websites) but wonder whether this idea would make sense: we'd point to a JSON file that would then be resolved as the new JSON state upon first load. For security reasons, if the file is not a valid JSON, the resolution would fail.
E.g. https://neuroglancer-demo.appspot.com/#!{"json_state_url":"gs://my-bucket-id/state.json"} or https://neuroglancer-demo.appspot.com/#!{"json_state_url":"https://github.com/chourroutm/saved-neuroglancer-states/blob/main/00001.json"} (handy for versioning)
If you can point me to the .ts file that resolves the state, I can make a PR with that functionality.
Beta Was this translation helpful? Give feedback.
All reactions