You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/image_picker/image_picker_android/android/src/main/java/io/flutter/plugins/imagepicker/FileUtils.java
+17-5Lines changed: 17 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,9 @@ class FileUtils {
45
45
* <p>Each file is placed in its own directory to avoid conflicts according to the following
46
46
* scheme: {cacheDir}/{randomUuid}/{fileName}
47
47
*
48
+
* <p>File extension is changed to match MIME type of the file, if known. Otherwise, the extension
49
+
* is left unchanged.
50
+
*
48
51
* <p>If the original file name is unknown, a predefined "image_picker" filename is used and the
49
52
* file extension is deduced from the mime type (with fallback to ".jpg" in case of failure).
50
53
*/
@@ -57,9 +60,14 @@ String getPathFromUri(final Context context, final Uri uri) {
57
60
// just clear the picked files after the app startup.
Copy file name to clipboardExpand all lines: packages/image_picker/image_picker_android/android/src/test/java/io/flutter/plugins/imagepicker/FileUtilTest.java
0 commit comments