Cordova 图像选择器从其中不存在图像的缓存文件夹返回临时 URL [英] Cordova Image Picker Returning Temp URL From Cache Folder Where Images Are Not Present In It
问题描述
当我从 android 设备中选择图像时无法获取正确的图像 url,我可以从没有复制原始图像的缓存中获取临时图像 url.
我从插件中得到的Url是这样的.
file:///data/user/0/com.myapp.dev/cache/tmp_20180118_125700267959888.jpg"
有没有办法获取原始图像路径或其中存在重复图像的临时 url 本身?
插件网址:https://github.com/wymsee/cordova-imagePicker.git
插件版本:1.1.1
如 git 存储库自述文件中所述:
<块引用><块引用>Android 使用注意事项 插件返回存储在临时目录.这些图像通常不会被删除虽然自动.文件应在您之后移动或删除在 javascript 中获取他们的文件路径.
无论如何,我认为您需要编辑插件源以在 javascript 回调中返回原始图像路径.
Not able to get the right image url when I select the images from the android device, I am able to get the temp image url from the cache where there is no original imaged copied to it.
The Url which I got from the plugin looks like this.
"file:///data/user/0/com.myapp.dev/cache/tmp_20180118_125700267959888.jpg"
Is there any way to get the original image path or the temp url itself where the duplicate image is present in it?
Plugin URL : https://github.com/wymsee/cordova-imagePicker.git
Plugin Version :1.1.1
As reported in git repository readme:
Note for Android Use The plugin returns images that are stored in a temporary directory. These images will often not be deleted automatically though. The files should be moved or deleted after you get their filepaths in javascript.
Anyway i think you need to edit source of plugin to return original image path in javascript callback.
这篇关于Cordova 图像选择器从其中不存在图像的缓存文件夹返回临时 URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!