[FEATURE] Another option to use save system?
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I'm always frustrated when I can't open the same document on 2 different devices (this isn't real-time collaboration, but a “save-here-read-there”) without having to generate links to it every time and paste it again on another device.
I run drawdb on a small local server and imagine a separate backend server to allow this behavior.
Looking for the simplest, the minimum would be like this:
document saved:
- save in cache
- send request to external api (same as with gists)
open document:
- send request to external api (same as with gists)
- compare with the cache if it exists and allow the user to choose one of the two.
The server exposes the following routes
- save/
- load/
From now on I don't really care what it should look like, so that's my opinion.
There's one case left, how do I know how to open this specific document?
Option 1:
Create a user, relate the documents to that user and the rest is obvious...
http://server.com/save/user_id/document_id
Pros
Everything a user could offer
Cons
Implementing the user itself
Option 2:
Generate a document link (hash) which will be the uuid of that document on the server. Keep a list of recent documents cached on the web with links to uploaded documents. Allow a new document to be uploaded via a link
http://server.com/save/document_uuid
Pros
- extremely simple
- no user required
Cons
- extremely simple
- It is possible that over time documents can become “dead references” because no one else has a link to them.
Yeah, thing is, it's not just a server we need, we'll also need file storage and a lot of it (just judging based on the number of diagrams shared this far, imagine saving them all). Here are a few less resource-intensive options (at least from our end).
- log in with github and have your diagrams saved to your gists or a repository
- put in a github token and have your diagrams saved to your github
Also I'd prefer to keep this as simple and as "self-contained" as possible