简体   繁体   English

将图像永久存储在脱机webApp中[Android WebView]

[英]Store images permanent in an offline webApp [Android WebView]

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) -> LocalStorage:永久但只有5MB的空间(找不到重新压缩的选项)

-> indexedDB: 50MB storage on desktop, but mobile (what's needed) only 5MB, too -> indexedDB:台式机上有50MB的存储空间,但移动设备(需要)也只有5MB

-> Filesystem API: not clear if it's supported yet or in near future ->文件系统API:尚不清楚它是否被支持或在不久的将来

-> HMTL5 Cach Manifest: static but not dynamic for my usage -> HMTL5 Cach清单:对于我的用法,静态但不是动态的

-> directly in DOM: enough space but not permanent ->直接在DOM中:足够的空间,但不是永久的

-> compress DataURL before storing in localStorage / indexedDB: it's a beginnig, but not the solution ->在存储到localStorage / indexedDB中之前先压缩DataURL:这是一个开始,但不是解决方案

Is there a solution at all? 有没有解决方案? I don't know how to continue anymore ... 我不知道该如何继续了...

You can store images permanantly in php using a mySQL database or just using the 您可以使用mySQL数据库将图片永久存储在php中,也可以仅使用

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

Because javascript is cilent side it is impossible to stire images permanantly 由于javascript语气流畅,因此无法永久搅拌图像

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM