Cordova图像选择器从其中不存在图像的缓存文件夹返回临时URL [英] Cordova Image Picker Returning Temp URL From Cache Folder Where Images Are Not Present In It

查看:44
本文介绍了Cordova图像选择器从其中不存在图像的缓存文件夹返回临时URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我从android设备中选择图像时,无法获得正确的图像URL,我可以从没有复制原始图像的缓存中获得临时图像URL.

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"

"file:///data/user/0/com.myapp.dev/cache/tmp_20180118_125700267959888.jpg"

是否可以获取原始图像路径或其中存在重复图像的临时URL本身?

Is there any way to get the original image path or the temp url itself where the duplicate image is present in it?

插件URL: https://github.com/wymsee/cordova-imagePicker.git

插件版本:1.1.1

Plugin Version :1.1.1

推荐答案

如git存储库自述文件中所述:

As reported in git repository readme:

Android使用说明插件返回存储在临时目录.这些图像通常不会被删除虽然自动.您之后应移动或删除文件在javascript中获取文件路径.

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.

无论如何,我认为您需要编辑插件源以在javascript回调中返回原始图像路径.

Anyway i think you need to edit source of plugin to return original image path in javascript callback.

这篇关于Cordova图像选择器从其中不存在图像的缓存文件夹返回临时URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆