Load a gltf model from HTML file input

I am trying to prompt the user to upload a GLTF file, that is then added to the scene. The problem is that when the .gltf model is loaded, the loader tries to find the textures and files associated with it, resulting in errors like this:
blob:http://127.0.0.1:5500/textures/metal_baseColor.jpeg net::ERR_FILE_NOT_FOUND
The createObjectURL method only creates a URL for the .gltf file, which means texture can’t be loaded like that. How can I work around this?

Here’s the full code:

      let fileInput = document.querySelector('input[type="file"]');
      fileInput.click();
      fileInput.addEventListener('change', (e) => {
        let url = URL.createObjectURL(fileInput.files[0]);
        new THREE.GLTFLoader().load(url, (result) => {
        let model = result.scene.children[0];
        scene.add(model);
      });