cleaning the upload field after clear callback

I do not understand why when cleaning the upload field, the name attribute of it disappears, then insert this line as a test and it worked perfectly