How does js delete the specified file within the files object within the input node?

< H1 > html: < / H1 >

upload multiple images using input, and confirm after selecting multiple images.

< H1 > jquery: < / H1 >

use jquery to obtain the data of the files object in the input node, for example, there are five image files in the acquired files object.
you can do a lot of things at this time, such as image preview.
however, I found that the second image didn"t work well and I didn"t want to upload it, so I deleted it. However, after I deleted it, the server still received the data of this image and uploaded it.
so, my delete operation only deletes the dom node that previews the image, not the second image file in the files object in the input node.

< H1 > Q:? < / H1 >

so how do I delete it?
jquery or javascript Please show me the example code!

Mar.16,2021

var fileEle = document.getElementById ("file");

        var formData = new FormData();  
        for(var i in file.files){//formData.append('file',file.files[0])  
            formData.append('file',file.files[i]);  
        } 
        delete formData[0]//
        $.ajax({  
            url: '/upload',  
            type: 'POST',  
            data: formData,  
            cache: false,  
            contentType: false,  
            processData: false,  
            success: function(data){   
                //
            } 
        }); 
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b370ce-2c06f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b370ce-2c06f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?