0

「 https://github.com/nervgh/angular-file-upload 」にあるangularjsファイルアップローダーを使用しているため、jsコードは次のようになります。

var urls = ['url1', 'url2'];
var uploaders = $scope.uploaders = urls.map(function(url) {
    return new FileUploader({url: url});
});

$http.get('url.php').then(function(resp) {
   $scope.images = resp.data.images; // images array
   uploaders[0].addToQueue($scope.images[0]); 
  // add first img to 1st uploader
   var i;
   for(i=1;i<$scope.images.length;i++){ 
      uploaders[1].addToQueue($scope.images[i]); 
   }
   // append other images to 2nd uploader

});

今、私はuploaders[0].queue.length = 1を取得できますが、 uploaders[0].queue [0].file.nameのような他のプロパティは取得できません。何か提案はありますか?

4

0 に答える 0