Data is not getting in Back End using ng-file-upload

134 views Asked by At

I am using AngularJs for my front end.And i am using ng-file-upload for reading image and pass it to my back end, But it sending REST call to my back end but it doesn't send any data to my back end. Code:

$scope.uploadData = function(){

    var tempData = {file: $scope.file, 'data': $scope.news};

    Upload.upload({
          url: '/createNEWS',
          data: tempData
    })

};

My Back End getting {} Means null

0

There are 0 answers