I want to send an image (I'll save it to the same bank), but I do not know how to send it together in POST
.
I'm using AngularJs
:
<input type="file" ng-model="user.imageProfile">
$scope.register = function (user) {
if (user.password != user.passwordConfirm) {
$rootScope.showToast("Confirmação de senha inválida!");
return null;
}
$http.post($rootScope.serviceBase + "users", user).then(function () {
$rootScope.showToast("Cadastrado com sucesso");
$mdDialog.cancel();
});
};