diff --git a/base/cvd/cuttlefish/host/frontend/webrtc/html_client/js/app.js b/base/cvd/cuttlefish/host/frontend/webrtc/html_client/js/app.js index d92173905ff..27a7d9399e8 100644 --- a/base/cvd/cuttlefish/host/frontend/webrtc/html_client/js/app.js +++ b/base/cvd/cuttlefish/host/frontend/webrtc/html_client/js/app.js @@ -605,10 +605,10 @@ class DeviceControlApp { } var filename= file_selector.files[0]; - if (filename.type.match('\gpx')) { + if (filename.name.endsWith('.gpx')) { console.debug("import Gpx locations handling"); loadFile(onLoad_send_gpx_data); - } else if(filename.type.match('\kml')){ + } else if(filename.name.endsWith('.kml')){ console.debug("import Kml locations handling"); loadFile(onLoad_send_kml_data); }