When I am using a FormData object to upload a file, I want to add functionality to delete the file from FormData. However, I encountered an error stating that the delete property does not exist on the FormData object.
formData.delete(fileName)
Code
upload(){
let formData = new FormData();
let inputEl: HTMLInputElement = this.inputEl.nativeElement;
let files: FileList = inputEl.files;
formData.append('uploadFile', files, files.name);
}
delete(fileName){
formData.delete(fileName);
}