danialfarid / ng-file-upload

Lightweight Angular directive to upload files with optional FileAPI shim for cross browser support
MIT License
7.87k stars 1.59k forks source link

Select multiple images from google photo but only show one #2089

Open william-shih opened 6 years ago

william-shih commented 6 years ago

With ng-file-upload, I set up the server which can support to upload files even from the cellphone. I can select multiple images in my cellphone to upload. However, when I select multiple images from google photo to upload it only show one image. I debug my code and find there is only one file in the filelist from google photo even select multiple images. The way I get the filelist is from the event (event.target.files) is shown below (skip some arguments and code):

<input type="file" uploadbtn="filelist" multiple ng-show="false">
.directive('uploadbtn', [ function() {                                                                                                      
    return {                                                                                                                                                                                   
        link: function(scope, element, attr, ctrl) {                                                                                                                                                                                                                                                                                     
            element.bind('change', function(event) {                                                                                                                                       
                scope.$apply(function() {                                                                                                                                                      
                    var files = event.target.files,                                                                                                                                                                                                                                                                                           
                    if (files.length) {                                                                                                                                                        
                           ... // list file to upload from files                                                                                                                      
                    }                                                                                                                                                                                                                                                                                                                                               
                });                                                                                                                                                                            
            });                                                                                                                                                                                
        }                                                                                                                                                                                      
    };                                                                                                                                                                                         
}]) 

Is there a limit for google photo to do multiple upload?