2015-09-26 100 views

回答

0

您可以一次最多选择10张图像。

使用多个图像选择器插件来选择多达10个图像。

Github上链路https://github.com/wymsee/cordova-imagePicker

安装 -

phonegap plugin add https://github.com/wymsee/cordova-imagePicker.git 

cordova plugin add https://github.com/wymsee/cordova-imagePicker.git 

示例 -

window.imagePicker.getPictures(
    function(results) { 
     for (var i = 0; i < results.length; i++) { 
      console.log('Image URI: ' + results[i]); 
     } 
    }, function (error) { 
     console.log('Error: ' + error); 
    }, { 
     maximumImagesCount: 10, 
     width: 800 
    } 
); 
+3

谢谢。但是您确定无需打开相机卷筒选择器即可使用它吗?我想在我的应用程序中实现以下功能: 用户访问名为“图库”的菜单,他们立即看到由我的应用程序(不是本地相机卷轴选择器)呈现的相机胶卷图片库。 – Makaveli

+0

这个应用程序将打开您的画廊。人们可以从图库中的任何文件夹中选择图像。它不会限制用户到特定的文件夹。 –

+2

然后它不是我想要的。我想收集所有的用户的照片,而不与他们交互... – Makaveli