P
P
Pavel2017-08-03 07:46:59
Android
Pavel, 2017-08-03 07:46:59

What is the best way to store offline and sync image to html?

Hello! There was such a question. There is a developed notes application, a web version and a mobile client, between which synchronization takes place. Like evernote. The mobile client has its own local database so that you can work offline. The note itself is in html format. Accordingly, if you implement stupidly uploading an image to the server and inserting it into html, then this will not work offline on a mobile client. My only idea is to use a certain image id that is stored in html, and the image is "nearby", that is, in the offline mobile client, the path to the note is replaced with a local one, in the web version with its own. When synced back to an id that is recognized on the other side and replaced with its own path. But all this is a crutch, it seems to me, and delivers a separate difficulty. Maybe there is a better option? As for example, I never figured out evernote.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri Istomin, 2017-08-03
@Nimo_tsi

And if the image is converted to base64 and stored in the html file itself? The truth will weigh a little more than jpg.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question