Upload multiple files to firestore

So I am creating a field where multiple files are uploaded to a firestore storage, I use the file picker with multiple files option enabled. the files are uploaded succesfuly but when I try to save the names of the files uploaded to a firestore document field which have an array of strings value it fails.
I tried using the fileName variable from the file picker it gives “cannot read properties of undefined reading map” when i click on submit form, also using the .map() doesn’t allow the form to be posted, I am trying to know how does the file picker work when multiple files are uploaded? if I can see the values of each field I will be able to come with something using the javascript field in the fields for the collection.