[FEATURE] Another option to use save system?
- Dominant language
- JavaScript
- Stars
- 39.5k
- Forks
- 3.2k
- Avg merge
- 10h 46m
- Merged PRs (30d)
- 16
Description
**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.
Contributor guide
Assessment
This issue has not been assessed yet.