Store images permanent in an offline webApp [Android WebView]

43 Views Asked by At

I want to store images (taken by the user) permanent, to provide offline funtionality. If the user has an internet connect the pictures will be stored at the server later.

The last days I only searched for an answer, but I'm already not sure, which is the best way to it.

-> SessionStorage: not permanet

-> LocalStorage: permanent but only 5MB space (coudln't find an option to rezise)

-> indexedDB: 50MB storage on desktop, but mobile (what's needed) only 5MB, too

-> Filesystem API: not clear if it's supported yet or in near future

-> HMTL5 Cach Manifest: static but not dynamic for my usage

-> directly in DOM: enough space but not permanent

-> compress DataURL before storing in localStorage / indexedDB: it's a beginnig, but not the solution

Is there a solution at all? I don't know how to continue anymore ...

1

There are 1 best solutions below

3
On

You can store images permanantly in php using a mySQL database or just using the

http://php.net/manual/en/function.move-uploaded-file.php

Because javascript is cilent side it is impossible to stire images permanantly