File Upload using AngularJS

前端 未结 29 2021
野趣味
野趣味 2020-11-21 07:24

Here is my HTML form:

29条回答
  •  逝去的感伤
    2020-11-21 08:12

    HTML

    
    

    add 'profileimage()' method to your controller

        $scope.profileimage = function(selectimage) {
          console.log(selectimage.files[0]);
     var selectfile=selectimage.files[0];
            r = new FileReader();
            r.onloadend = function (e) {
                debugger;
                var data = e.target.result;
    
            }
            r.readAsBinaryString(selectfile);
        }
    

提交回复
热议问题