How to multi upload files with tied input block?
And store this in an array of objects 
1 Answer
This link may help you with the multiupload part, the only thing that you need to change is the addFile part. We just need to modify it a bit.
First of all, modify the state to be const state = reactive({files, fileName: ''}) and then the addFiles function to this:
const addFiles = (event) => {
const file = event.target.files[0]
const blob = file.slice(0, file.size, file.type);
const newFile = new File([blob], state.fileName, {type: file.type});
state.files.push(newFile)
}
If you want several inputs, then just modify the addFiles state.fileName to change it to an array and use state.fileNames[index] to use that name.
files[]and the textfile_texts[]. One array index in files will then match with an array index of file_texts