fix: update MIME type handling for unknown file extensions

This commit is contained in:
Sarto
2026-05-08 22:06:49 +03:30
parent 3fb3044bd1
commit b5cf5b91f2
@@ -276,7 +276,10 @@ class AndroidBridge(private val activity: Activity) {
"xlsx" -> "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
"ppt" -> "application/vnd.ms-powerpoint"
"pptx" -> "application/vnd.openxmlformats-officedocument.presentationml.presentation"
else -> sanitiseMime(fallback)
// Unknown extension: don't trust the sniffed fallback (often
// text/plain, which makes MediaStore append .txt). Generic
// binary leaves the filename verbatim.
else -> "application/octet-stream"
}
}