recognize more mimetypes as documents or archives

This commit is contained in:
tibbi 2021-10-13 10:38:28 +02:00
parent ec6cafecd8
commit 87c3a905e9
1 changed files with 20 additions and 3 deletions

View File

@ -29,10 +29,27 @@ class StorageFragment(context: Context, attributeSet: AttributeSet) : MyViewPage
// what else should we count as an audio except "audio/*" mimetype
private val extraAudioMimeTypes = arrayListOf("application/ogg")
private val extraDocumentMimeTypes = arrayListOf(
"application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
"application/pdf",
"application/msword",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"application/javascript"
)
private val archiveMimeTypes =
arrayListOf(
"application/zip",
"application/octet-stream",
"application/json",
"application/x-tar",
"application/x-rar-compressed",
"application/x-zip-compressed",
"application/x-7z-compressed",
"application/x-compressed",
"application/x-gzip",
"application/java-archive",
"multipart/x-zip"
)
private val archiveMimeTypes = arrayListOf("application/zip", "application/x-tar", "application/octet-stream", "application/json")
override fun setupFragment(activity: SimpleActivity) {
ensureBackgroundThread {