3 ms·
The whole state json-stringified and then stored as base64 in the localstorage. Looks like a valid solution for that amount of data.
by realPubkey 8y ago
The whole state json-stringified and then stored as base64 in the localstorage.
Looks like a valid solution for that amount of data.
- TeMPOraL 8y agoI think the question should be restated as: how do you save to a file and load from a file? The use of localStorage means you can only have one version of a canvas per browser/device pair.
- todd3834 8y agoMaybe not ideal but you _could_ use the browser inspector and copy the data from local storage and send it around manually. Not suggesting this is a workable solution but if you just needed to get it off one computer to another.
- Gcam 8y agoCould just offer downloading the data as JSON in a file as well as having it in local storage?
- numbsafari 8y agoCreate a gist and support loading from a gist URL? It's shareable between devices and people, and even editable if you pretty-print the JSON, rather than base64 encoding it. I would probably support both options. https://developer.github.com/v3/gists/#create-a-gist https://developer.github.com/v3/gists/#create-a-gist
- sleepychu 8y agoput my contact info in a public gist and say goodbye to me as a business partner.
- numbsafari 8y agoYeah, good point. You can make the gist non-public by default (set public=false), and perhaps gists are the wrong tool, but something akin to gists seem like a good way to do something like this. I know Dave Winer was using the DropBox API in this way for some of his outlining tools. But your point is well made, one of the downsides of the "web" as a platform is that it's hard to know what happens with the data you save to a random web application. I've had experience with product managers loading entire customer lists of emails into random "email validation tool"s, which were clearly just honeypots for foolish people's data.
- pspeter3 8y agoWhy convert to Base64?