PhoneGap - storing an image, then getting its base64encoded data

前端 未结 1 1041
天涯浪人
天涯浪人 2021-01-03 06:36

I am using the PhoneGap Camera API to take a picture and store it using destinationType.FILE_URI. This portion is working. I can subsequently take the path prov

相关标签:
1条回答
  • 2021-01-03 07:09

    It is because the Android OS has a URI handler for the content:// protocol. The File API does not. However, there is a way for you to convert a content:// type URI into a FileEntry. Use:

    window.resolveLocalFileSystemURI("content://media/external/images/media/4292", win, fail);
    

    and the success callback win will be called with a FileEntry for you.

    0 讨论(0)
提交回复
热议问题