3
I want to send an image (I will save it in bank), but I do not know how to send it together on 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();
});
};
http://stackoverflow.com/q/6150289/4190610
– Jéf Bueno
Tell me something, the moment the user chooses an image,
user.imageProfile
has what value?– Jéf Bueno
@jbueno it doesn’t even show the attribute in the user object
– Felipe Paetzold