javascript - Not able to upload file using Angular JS $http Post -
my form data is:
var fd = new formdata(); //take first selected file fd.append("file", document.getelementbyid('file').files[0], "abc");
my api request is:
var config = { withcredentials : false, transformrequest : angular.identity, headers : { 'content-type': undefined } } return $http.post(url, fd, config)
at backend i'm still not getting object in params.
let me know why i'm not getting form data @ backend.
Comments
Post a Comment