admin管理员组文章数量:1379427
I am getting a JSON response from a web service that returns a file in either binary or base64 . I want to save this file to the fileSystem.
- I wanted to know the ideal (default/industry standard ) location to download these files for IOS/ ANdroid on the file system.
- IF there is no ideal place i would want to save them in the default downloads folder for IOS/Android. I would then like to know what is the location of these folders.
I also wanted to know which methods in the Phonegap FileAPi i need to use?
I am getting a JSON response from a web service that returns a file in either binary or base64 . I want to save this file to the fileSystem.
- I wanted to know the ideal (default/industry standard ) location to download these files for IOS/ ANdroid on the file system.
- IF there is no ideal place i would want to save them in the default downloads folder for IOS/Android. I would then like to know what is the location of these folders.
I also wanted to know which methods in the Phonegap FileAPi i need to use?
Share Improve this question asked Jan 27, 2014 at 8:00 vijarvijar 7814 gold badges14 silver badges25 bronze badges1 Answer
Reset to default 3There is no default place for downloads
Look the phonegap's File API for more info.
With phonegap you can request de temporary or the permanent file system
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);
window.requestFileSystem(LocalFileSystem.TEMPORARY, 0, gotFS, fail);
on iOS PERSISTENT returns the Documents directory, and the TEMPORARY returns the Caches directory on Android PERSISTENT returns the root of the SD card or phone memory, and TEMPORARY returns a folder inside the data folder.
To download the files use the FileTransfer
本文标签: javascriptDownload file to downloads folder iosandroid using phonegapStack Overflow
版权声明:本文标题:javascript - Download file to downloads folder iosandroid using phonegap - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744504524a2609515.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论