Loading a .gltf model from a user chosen file.

Hello, I have been stuck on this for a few days now and thought here would be a good place to ask about it. I’m working on a personal project and I want to add a way for users to choose what .gltf files the model viewer displays. I have a working viewer and I can take the file inputs, where I am struggling is how to use the user files in place of a normal locally referenced file. I have been trying to convert the users file to an Array buffer and then I was trying to use loader.parse to read the Array buffer. But this doesn’t seem to be working and I’m not even sure this is the best way to go about this. I have included some Images of the current code. Any help would be really appreciated, thanks in advance.
image
image


image