Skip to content
Open
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
11 changes: 6 additions & 5 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mr.flutter.plugin.filepicker">
<queries>
<intent>
<action android:name="android.intent.action.GET_CONTENT" />
<data android:mimeType="*/*" />
>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32"/>
<queries>
<intent>
<action android:name="android.intent.action.GET_CONTENT" />
<data android:mimeType="*/*"/>
</intent>
</queries>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,10 @@ object FileUtils {
fun loadData(file: File, fileInfo: FileInfo.Builder) {
try {
val size = file.length().toInt()
if (size > 10000000) {
throw RuntimeException("loadData: file size too large");
}

val bytes = ByteArray(size)

try {
Expand Down
8 changes: 5 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:

flutter_plugin_android_lifecycle: ^2.0.22
plugin_platform_interface: ^2.1.8
ffi: ^2.1.3
ffi: ^2.1.4
path: ^1.9.0
win32: ^5.9.0
cross_file: ^0.3.4+2
Expand All @@ -25,8 +25,10 @@ dev_dependencies:
sdk: flutter

environment:
sdk: ">=3.4.0 <4.0.0"
flutter: ">=3.22.0"
sdk: ">=3.7.0 <4.0.0"
flutter: ">=3.29.3"

resolution: workspace

flutter:
plugin:
Expand Down