Overwrite uploaded file

I have a form to allow file uploads,. im trying to make it so you can click a button to remove the file before the form is submitted.
I’m thinking of adding code like thisn to the click event for the button…

function removeImage(x) {

    FILES['Images'][x] = NULL;

Is that ok?

like https://davidwalsh.name/remove-item-array-javascript

since x would be the index of the FILES['Images'] array, can I use.....

FILES[‘Images’].splice(x, 1);

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.