Apurv Chaudhary
Apurv Chaudhary

Reputation: 1795

FormData.delete is not working in Internet Explorer

how to delete any key from FormData, bcoz Internet Explorer not support FormData.delete, here is my code, and i want to delete Formdata key,

this.PostRegistrationFormData = new FormData();
let localModel: any = _.clone(this.PostRegistrationModel);
this.PostRegistrationFormData.delete('profile_photo'); // FormData.delete not working in Internet Explorer.

so how to delete this?

Upvotes: 1

Views: 1020

Answers (1)

Ketan Chaudhari
Ketan Chaudhari

Reputation: 556

you have to delete key(profile_photo) before append in this.PostRegistrationFormData.

this.PostRegistrationFormData = new FormData();
let localModel: any = _.clone(this.PostRegistrationModel);
delete localModel.profile_photo;
//this.PostRegistrationFormData.delete('profile_photo');

Upvotes: 2

Related Questions