Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
## 10.3.7
### Android
- Fixed an issue where file type filtering was not being applied correctly, now only displaying files that match the selected MIME types. [#1906](https://github.com/miguelpruivo/flutter_file_picker/pull/1906)

## 10.3.6
## Android
### Android
- Added support for 16 KB page sizes. [#1888](https://github.com/miguelpruivo/flutter_file_picker/issues/1888)

## 10.3.5
## iOS
### iOS
- Fixed an error when loading large files (>= 2GB~).

## 10.3.4
## Android
### Android
- Detect HEIC and HEIF extensions as valid image
- Use compression format based file extension when compressing images.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ object FileUtils {
if (type == "dir") {
intent = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE)
} else {
if (type == "image/*") {
if (type != "*/*") {
intent = Intent(Intent.ACTION_PICK)
val uri = (Environment.getExternalStorageDirectory().path + File.separator).toUri()
intent.setDataAndType(uri, type)
Expand All @@ -159,15 +159,16 @@ object FileUtils {
intent.putExtra(Intent.EXTRA_MIME_TYPES, allowedExtensions)
}
} else {
intent = Intent(Intent.ACTION_OPEN_DOCUMENT).apply {
intent = Intent(Intent.ACTION_GET_CONTENT).apply {
addCategory(Intent.CATEGORY_OPENABLE)
type = [email protected]
if (!allowedExtensions.isNullOrEmpty()) {
putExtra(Intent.EXTRA_MIME_TYPES, allowedExtensions!!.toTypedArray())
} else {
putExtra(Intent.EXTRA_MIME_TYPES, type)
}
putExtra(Intent.EXTRA_ALLOW_MULTIPLE, isMultipleSelection)
putExtra("multi-pick", isMultipleSelection)

allowedExtensions?.let {
putExtra(Intent.EXTRA_MIME_TYPES, it.toTypedArray())
}
}

}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A package that allows you to use a native file explorer to pick sin
homepage: https://github.com/miguelpruivo/plugins_flutter_file_picker
repository: https://github.com/miguelpruivo/flutter_file_picker
issue_tracker: https://github.com/miguelpruivo/flutter_file_picker/issues
version: 10.3.6
version: 10.3.7

dependencies:
flutter:
Expand Down