Hello,
You have two ways:
1) Wrap the table inside a <form>
, so when you click in a “Send” button you can get the file by GET or POST.
2) Get the value by JS:
(js/custom.js):
$('.my-file-input').on('change', function(e){
var filepath = $(this).val();
// filepath
console.log(filepath);
if ( e.target.files[0] ) {
// create reader
var reader = new FileReader();
reader.readAsText(e.target.files[0]);
reader.onload = function(e) {
// file content
console.log(e.target.result);
};
}
});
HTML:
<input class="my-file-input" type="file" name="attachment" />
Hope it helps.
Kind Regards,
Rodrigo.