@@ -228,6 +228,17 @@ def import_resource(self, files: dict, execution_id: str, **kwargs) -> str:
228228 )
229229 return layer_name , alternate , execution_id
230230
231+ def pre_processing (self , files , execution_id , ** kwargs ):
232+ _data , execution_id = super ().pre_processing (files , execution_id , ** kwargs )
233+ # removing the content file from the files location
234+ if "content_file" in _data ["files" ]:
235+ _data ["files" ].pop ("content_file" )
236+
237+ _exec_obj = orchestrator .get_execution_object (execution_id )
238+ orchestrator .update_execution_request_obj (_exec_obj , {"input_params" : _data })
239+
240+ return _data , execution_id
241+
231242 def create_geonode_resource (
232243 self ,
233244 layer_name : str ,
@@ -236,13 +247,16 @@ def create_geonode_resource(
236247 resource_type : Dataset = ...,
237248 asset = None ,
238249 ):
239- # we want just the tileset.json as location of the asset
240- # asset.location = [path for path in asset.location if path.endswith(".json")]
241- # asset.save()
242250 exec_obj = orchestrator .get_execution_object (execution_id )
243251
244252 resource = super ().create_geonode_resource (layer_name , alternate , execution_id , ResourceBase , asset )
245- asset = self .create_asset_and_link (resource , files = exec_obj .input_params ["files" ], action = exec_obj .action )
253+ asset = self .create_asset_and_link (
254+ resource ,
255+ files = exec_obj .input_params ["files" ],
256+ action = exec_obj .action ,
257+ asset_type = "3dtiles" ,
258+ extension = "3dtiles" ,
259+ )
246260
247261 if isinstance (asset , LocalAsset ):
248262 # fixing-up bbox for the 3dtile object
0 commit comments