mirror of
https://github.com/sartoopjj/thefeed.git
synced 2026-05-18 02:14:43 +03:00
fix: update MIME type handling for unknown file extensions
This commit is contained in:
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user