diff --git a/app/src/main/java/ca/cgagnier/wlednativeandroid/ui/components/DeviceWebview.kt b/app/src/main/java/ca/cgagnier/wlednativeandroid/ui/components/DeviceWebview.kt index 3c8dba9e..25c0b891 100644 --- a/app/src/main/java/ca/cgagnier/wlednativeandroid/ui/components/DeviceWebview.kt +++ b/app/src/main/java/ca/cgagnier/wlednativeandroid/ui/components/DeviceWebview.kt @@ -389,13 +389,14 @@ class CustomWebChromeClient(private val context: Context) : WebChromeClient() { private fun getMimeType(acceptTypes: Array): String { for (type in acceptTypes) { - return when (type) { - ".json" -> "application/json" - ".css" -> "text/css" + return when { + type == ".json" -> "application/json" + type == ".css" -> "text/css" + type.contains("/") -> type else -> continue } } - return "application/octet-stream" + return "*/*" } }