mirror of
https://github.com/jellyfin/jellyfin-android.git
synced 2026-10-26 16:45:26 +00:00
Remove mime types from file picker intent
This commit is contained in:
1 parent
261b6b2202
commit
43bc98b6a4
1 file changed
+9
-1
@@ -42,7 +42,15 @@ class JellyfinWebChromeClient(
|
||||
return true
|
||||
}
|
||||
|
||||
fileChooserListener.onShowFileChooser(fileChooserParams.createIntent(), filePathCallback)
|
||||
val intent = fileChooserParams.createIntent().apply {
|
||||
// The file requests from jellyfin-web often use extensions, but Android only allows mime types
|
||||
// the default mapping from most webview implementations is too limited so we remove them
|
||||
// jellyfin-web validates chosen files to avoid wrong file types from being used
|
||||
removeExtra(Intent.EXTRA_MIME_TYPES)
|
||||
type = "*/*"
|
||||
}
|
||||
|
||||
fileChooserListener.onShowFileChooser(intent, filePathCallback)
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user