You can use something like that
updatePhoto: function (target, success, failed) {
var formElement = document.getElementById(target);
var formData = new FormData(formElement);
var request = new XMLHttpRequest();
request.open("POST", REQUEST_URL_PROFILE.findUrl("updatePhoto"));
request.onload = function (oEvent) {
if (request.status == 200) {
success();
} else {
failed();
}
};
request.send(formData);
return request;} *Cordialement, Armel EMBOLO* <https://accounts.google.com/SignOutOptions?hl=fr&continue=https://mail.google.com/mail&service=mail> *Ingénieur de travaux en Informatique de Gestion / Analyste programmeur* *Elève Ingénieur de Conception en Génie Logiciel* *Université de Maroua, Ecole Nationale Supérieure Polytechnique de Maroua (ex ISS)* *Facebook : Armel Embolo <https://www.facebook.com/armel.embolo>* *Linkedin : armel embolo <https://www.linkedin.com/profile/view?id=AAMAABYswuMBn33mi4o_x8R49OxfxiIQVAryzw4&trk=hp-identity-name>* *Tel : (+237) 650231339/698594740* 2018-02-26 11:24 GMT+01:00 Omar Ben Soussia <[email protected]>: > Hi, > i want to save an image/file from input file into assets folder ... Any > ideas ? > > -- > You received this message because you are subscribed to the Google Groups > "Angular and AngularJS discussion" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/angular. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
