I have file control and I am setting data attribute using jquery. But when I submit the form the I am getting null value of data attribute.
ad.html
<div class="field" align="left">
    <span>
        <h3>Upload your images</h3>
        <input type="file" id="files" data-filedata="" name="files[]"  multiple (change)="preview($event)" />
    </span>
</div>
Jquery code to set data attribute
$("#files").on("change", function(e) {      
    e.target.setAttribute('data-filedata', 'abc');
})
ad.ts
preview(event) {     
    console.log(event.target.getAttribute('data-filedata'))
}
 
    