Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name on iOS 14 does not include file extension #444

Closed
aaahrens opened this issue Oct 13, 2020 · 8 comments
Closed

Name on iOS 14 does not include file extension #444

aaahrens opened this issue Oct 13, 2020 · 8 comments
Labels
iOS Issue applies to iOS platform triage Further information is requested

Comments

@aaahrens
Copy link

Describe the bug
When picking a file on iOS 14 the name does not include the extension.

Issue details

  1. Platform (Android/iOS) => iOS
  2. Platform OS version => iOS 14
  3. File type (filter) — when applicable
  4. Detailed steps to reproduce=> Pick a file using the default example.

Flutter Version details
`
[✓] Flutter (Channel dev, 1.23.0-4.0.pre, on Mac OS X 10.15.6 19G2021 x86_64, locale en-US)
• Flutter version 1.23.0-4.0.pre at /Users/drunkengranite/flutter
• Framework revision 83dd176777 (3 weeks ago), 2020-09-22 12:04:44 -0700
• Engine revision 2abe69c608
• Dart version 2.10.0 (build 2.10.0-136.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/drunkengranite/Library/Android/sdk
• Platform android-29, build-tools 29.0.2
• Java binary at: /Users/drunkengranite/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/193.6626763/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.0.1, Build version 12A7300
• CocoaPods version 1.9.1

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.0)
• Android Studio at /Users/drunkengranite/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/193.6626763/Android Studio.app/Contents
• Flutter plugin version 48.0.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] IntelliJ IDEA Ultimate Edition (version 2020.2)
• IntelliJ at /Users/drunkengranite/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
• Flutter plugin version 49.0.4
• Dart plugin version 202.6397.47

[✓] VS Code (version 1.49.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.13.2

[✓] Connected device (4 available)
• iPhone 11 Pro (mobile) • A6E0D885-D509-48A2-B9DC-97236C8EDCDE • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)
• macOS (desktop) • macos • darwin-x64 • Mac OS X 10.15.6 19G2021 x86_64
• Web Server (web) • web-server • web-javascript • Flutter Tools
• Chrome (web) • chrome • web-javascript • Google Chrome 86.0.4240.75

• No issues found!
`
Additional context
Would you guys be interested in setting up multiplatform testing?

@aaahrens aaahrens added the new issue An issue that hasn't yet been seen from the maintainer label Oct 13, 2020
@miguelpruivo
Copy link
Owner

@aaahrens tried to replicate this without success. File always shows its extension. Could you please elaborate how to replicate it?

Thank you!

@miguelpruivo miguelpruivo added triage Further information is requested iOS Issue applies to iOS platform and removed new issue An issue that hasn't yet been seen from the maintainer labels Oct 13, 2020
@miguelpruivo
Copy link
Owner

@aaahrens any news regarding this?

@aaahrens
Copy link
Author

Um yeah I'll make an example repo with steps and video proof, but it's already confirmed by multiple devs on my team. Just to be clear, it's on iOS 14, FileType.any and with flutter channel master.

@miguelpruivo
Copy link
Owner

@aaahrens the plugin is only tested against stable channel as master has a lot under development. I couldn’t reproduce it with stable, could that be the issue?

@orestesgaolin
Copy link

On current stable 1.22.2, the same issue on iOS simulator running iOS 14.0

          final result = await FilePicker.platform.pickFiles(
            type: FileType.custom,
            allowedExtensions: ['jpg', 'png', 'pdf'],
          );

Download some PDF to your phone's files. Go to Browse > On my iPhone > Downloads > select some PDF file

image

The resulting result.files.single.name is sample and result.files.single.path is /Users/dominik/Library/Developer/CoreSimulator/Devices/CA2A19B0-A363-4D5A-9C59-D523D30124C1/data/Containers/Data/Application/29343E05-E76D-4A9F-922B-C0B11E83DE04/tmp/com.app/sample.pdf

@miguelpruivo
Copy link
Owner

This is quite odd as the extension is extracted from the file name itself (it’s just a helper getter anyway).

I’ll take a look ASAP. Thank you.

@orestesgaolin
Copy link

I wonder if the file extension is removed in this line

@miguelpruivo
Copy link
Owner

@orestesgaolin that's correct. I think that was probably because at first I was considering not including the extension in the name property but then changed my mind later on and missed that. 😅

Thank you all for reporting.

Fixed and published with 2.0.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iOS Issue applies to iOS platform triage Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants