Phonegap - Retrieve photo from Camera Roll via path

后端 未结 4 1204
梦谈多话
梦谈多话 2020-12-29 05:49

In my PhoneGap/jQuery Mobile app, I\'m currently using PhoneGaps\' Camera API to allow the user to take a photo, which is also stored in the Camera Roll. I\'m setting Destin

4条回答
  •  旧巷少年郎
    2020-12-29 06:21

    After you retrieve the file using the FILE_URI method you should use the File API to copy the image from the temp folder to the Documents folder and store the new path in your DB.

    So you would take the result of your getPicture() pass it to window.resolveLocalFileSystemURI() to get a FileEntry. Then you can call FileEntry.copyTo() method to back up your file.

提交回复
热议问题