question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LoadModelFromUrlList fails to load file "No importable file found"

See original GitHub issue

This is the rough way my code looks

            OV.SetExternalLibLocation("libs");
            OV.Init3DViewerElements();
            let viewer = new OV.EmbeddedViewer(parentDiv.current, {
                camera: new OV.Camera(
                    new OV.Coord3D(-10.5, -30.0, 20.0),
                    new OV.Coord3D(0.0, 0.0, 0.0),
                    new OV.Coord3D(0.0, 0.0, 1.0)
                ),
                backgroundColor: new OV.Color(249, 249, 249),
                defaultColor: new OV.Color(200, 200, 200),
                edgeSettings: {
                    showEdges: false,
                    edgeThreshold: 1,
                },
                environmentMap: [
                    "../website/assets/envmaps/grayclouds/posx.jpg",
                    "../website/assets/envmaps/grayclouds/negx.jpg",
                    "../website/assets/envmaps/grayclouds/posy.jpg",
                    "../website/assets/envmaps/grayclouds/negy.jpg",
                    "../website/assets/envmaps/grayclouds/posz.jpg",
                    "../website/assets/envmaps/grayclouds/negz.jpg",
                ],
                onModelLoaded: () => {
                    setDirection();
                    openDetails();
                },
            });
            viewerRef.current = viewer;
            viewer.LoadModelFromUrlList([fullFile.url]);

Ideally, this would just load the model from the URL. The URL is a standard download URL for firebase storage, it works fine on it’s own to download the file and can also be fetched fine using Axios. Using LoadModelFromFileList works fine for locally uploaded files as below

                viewerRef.current = viewer;
                var dt = new DataTransfer();
                dt.items.add(file);
                var file_list = dt.files;
                viewer.LoadModelFromFileList(file_list);

But I need to grab a previously uploaded file from firebase and load it into the viewer to edit and as described LoadModelFromUrlList isn’t working. Is there a work around for this or is there something I’m missing as to why this isn’t working? Thanks in advance

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
callum-gandercommented, Sep 7, 2022

This worked perfectly, thank you!

1reaction
kovacsvcommented, Sep 6, 2022

Yes, the file type is detected based on the url, and this url doesn’t contain the file name and extension. There is a solution for this, check out this example: https://github.com/kovacsv/Online3DViewer/blob/master/sandbox/embed_selfhost_noextension.html.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Simulator fails to import data - X… | Apple Developer Forums
It seems that on Catalina it is no longer possible to transfer files from the Finder to the simulator. For me it's a...
Read more >
Import file from parent directory? - python - Stack Overflow
I get the following error: ImportError: Import by filename is not supported. I am attempting to import using the following syntax:
Read more >
GUS FILE IMPORT GUIDE - USDA Rural Development
Unsuccessful File. Import. If the file is not uploaded successfully, the system displays an error message; users may also attempt to upload the...
Read more >
Data Import error message reference - Analytics Help
Message Meaning So... Empty column header at column number X. The upload file is missing a column header. Ed... Multiple errors occurred: List of multiple...
Read more >
Import errors for Desktop Client - Relativity Documentation
The following table lists the most common import errors found in the Relativity ... Note: When an item-level error occurs in a load...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found