0
我有以下代碼,它成功地選擇了許多圖像,我想要的。Cordova圖像選擇器,要上傳多個圖像一次
angular.module('appControllers', [])
.controller('HomeCtrl', ['$scope', '$rootScope', '$cordovaCamera', function($scope, $rootScope, $cordovaCamera) {
$scope.ready = false;
$scope.images = [];
$rootScope.$watch('appReady.status', function() {
console.log('watch fired '+$rootScope.appReady.status);
if($rootScope.appReady.status) $scope.ready = true;
});
$scope.selImages = function() {
window.imagePicker.getPictures(
function(results) {
for (var i = 0; i < results.length; i++) {
console.log('Image URI: ' + results[i]);
$scope.images.push(results[i]);
}
if(!$scope.$$phase) {
$scope.$apply();
}
}, function (error) {
console.log('Error: ' + error);
}
);
};
}])
參考: - http://www.raymondcamden.com/2015/03/12/selecting-multiple-images-in-a-phonegapcordova-app
我的問題我如何使用PHP作爲後端編程和角的js作爲前端上傳到服務器?
在此先感謝!