Php 无插件支持IE9的angularjs多文件上传

Php 无插件支持IE9的angularjs多文件上传,php,angularjs,Php,Angularjs,我正在寻找一个简单,重量轻的方式上传使用角度。 就像这个上传。它更难。所以我想要一个简单的 Check out "http://stackoverflow.com/a/20506037/1632286" This link consist all the posible ways for angular :-) I did it like this :- Here is the code i used in my project may be it help you. HTML:

我正在寻找一个简单,重量轻的方式上传使用角度。

就像这个上传。它更难。所以我想要一个简单的

Check out "http://stackoverflow.com/a/20506037/1632286" This link consist all the posible ways for angular :-)

I did it like this :-
Here is the code i used in my project may be it help you.

HTML:

    <form role="form" name="myForm" ng-submit="submitCuisine()" novalidate>
                <div class="form-group">
                   <label for="description">Image</label> 
                   <input type="file"  file-input="files" name="file"/>
                </div>  
                <button class="btn btn-primary" type="submit"> Submit</button>
            </form>

Controller:

    $scope.submitCuisine=function(){

            var fd=new FormData();
            angular.forEach($scope.files,function(file){
                fd.append('file',file);
            })
            $http.post('admin/managecuisineAdd',fd,{
                transformRequest:angular.identity,
                headers:{'Content-type':undefined}
            }).success(function(data){
                $scope.message="Successfully"
            });

    }

Directive:

    myApp.directive("fileInput",['$parse',function($parse){
        return{
            restrict:'A',
            link:function(scope,ele,attrs){
                ele.bind('change',function(){
                    $parse(attrs.fileInput).
                    assign(scope,ele[0].files)
                    scope.$apply()
                });
            }
        }
    }]);