P1 is uploaded using python script,P2 is uploaded by hand,I think the problem is the sourceType of the payload,because when I upload the GLB and json file,there is a question: What kind of data is this?
Hi,
Can you share which options you chose when uploading the first asset on the UI? And then the options you provided with the API call?
It most likely is the options provided to the API call with the python script that might be incorrect. There shouldn’t be a difference in behavior between the UI and API versions if the options provided are the same.
Also just to make sure that P1 and P2 that you reference here are the same type of data?
Thanks,
Ankit
Hi,
I just realized you posted an email to us too with the code. Looks like you defined your source type to be 3DTILES
. What you want with the glb file upload is either a 3D_MODEL
or 3D_CAPTURE
source type based on the type of glb you have.
You can see more here: Ion REST API documentation – Cesium
Thanks,
Ankit
Thank for your reply!My glb file is as shown in the figure1. Is there any problem with the pyload parameters I set ?
payload = {
‘name’: f’My 3D Tileset {uuid.uuid4()}',
‘description’: ‘Uploaded via Python script’,
‘type’: ‘3DTILES’,
‘options’: {
‘sourceType’: ‘3DTILES’
}
Hi,
To confirm, you are trying to upload a pre-tiled 3d tileset to Cesium ion via the API correct?
In this case you are missing the options.tilesetJson
field which is required when using the 3DTILES
source. This only appears once you select the sourceType
Sorry for taking so long to reply, thank you very much for your answer, it helped me solve this problem