Skip to content Skip to sidebar Skip to footer

Send File Using Put Method Angularjs

I am using angularjs. I have created a file upload function using angularjs with laravel. The file upload with FormData is working fine. But when I try to send file through PUT met

Solution 1:

I have the same issue and finally i found this code

var formData = new FormData();
angular.forEach($scope.data, function (value, key) {
    formData.set(key, value);
});

$http.post(uploadUrl, formData, {
    transformRequest: angular.identity,
    headers         : {'Content-Type': undefined}
});

Post a Comment for "Send File Using Put Method Angularjs"