Check out FormData to delete a record

I have a FormData object:

var form = jQuery("#options section.active form")[0];
var data = new FormData(form);

      

The form is really sequential and I want to replace one of the entries before loading the ajax (the goal is to take out the image and replace it with the same image, but resize and compress), but I don’t know how to find out the key which is used for the image. When I know the key, I would use FormData.delete

and thenFormData.set

If you know a better workaround, I'm pleased too, thanks.

Edit: I want to validate an element in javascript, for example:

Console.log(data);

      

+3
javascript ajax form-data


source to share


No one has answered this question yet

Check out similar questions:

7494
How can I remove a specific element from an array in JavaScript?
5722
How can I remove a property from a JavaScript object?
1067
Remove item by ID
527
Sending multipart / formdata with jQuery.ajax
390
How can I submit FormData objects using Ajax requests in jQuery?
175
How do I check FormData?
1
Ajax: submit formData along with custom variable
1
JQuery 1.10 ajax file upload formdata issue
1
JQuery ajax FormData () posting invalid key names
0
File not received on server using FormData



All Articles
Loading...
X
Show
Funny
Dev
Pics