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

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -