xeokit-sdk icon indicating copy to clipboard operation
xeokit-sdk copied to clipboard

3D model URL from GDrive or Mega

Open phxd88 opened this issue 2 years ago • 4 comments

Hi! I am trying to embed a 3D model (gltf-glb) from gdrive or mega, but with no positive results. I followed instruction for hosting and sharing correctly files, but probably I missed something.

I tried src and also href in the loader code:

const gltfLoader = new GLTFLoaderPlugin(viewer); const sceneModel = gltfLoader.load({ id: "myModel", src: "https://drive.google.com/uc?export=view&id=GDRIVE_FILE_ENCRYPTED_CODE", useDataTextures: true,

Could someone help me? thank you

phxd88 avatar Oct 31 '23 14:10 phxd88

I think this is not the URL of the gltf file, but the URL of the HTML page showing you the file. If I download a file on GDrive, the URL of the file looks like https://drive.usercontent.google.com/download?id=my_id&export=download&authuser=1&confirm=t&uuid=my_uuid&at=my_at

Amoki avatar Oct 31 '23 15:10 Amoki

Thank you. However, I tried to put the the download link but nothing.

phxd88 avatar Nov 02 '23 10:11 phxd88

Is your file accessible from an unauthenticated user with the URL?

Or maybe you can't use GDrive at all for this

Amoki avatar Nov 02 '23 20:11 Amoki

Thank you Amoki for your time,

Yes, files are available also for other users. I tried GDrive and Mega with free access via shared link but nothing. I also used download link, but the viewer goes into an infinite loader loop (3D models are about 40-80MB).

phxd88 avatar Nov 03 '23 12:11 phxd88