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

Whitespace in title messes up extension. #995

Closed
1 of 4 tasks
wiany11 opened this issue Mar 13, 2022 · 9 comments
Closed
1 of 4 tasks

Whitespace in title messes up extension. #995

wiany11 opened this issue Mar 13, 2022 · 9 comments
Assignees
Labels
android Issue applies to Android platform improvement Improvement needed on a specific feature stale

Comments

@wiany11
Copy link

wiany11 commented Mar 13, 2022

Before creating an issue, make sure that you are on the latest file_picker version and that there aren't already any similar opened inssues. Also, check if it isn't described on the Wiki, specially on Troubleshooting page.

Also, sometimes a simple flutter clean and flutter build again with latest file_picker version, may end up by fixing cached issues, so I encourage you to first do so.

Describe the bug

A picked file's .path are .extension messed up if a title has whitespaces.
For example, if a file at /storage/emulated/0/video/2021_04_10 02:59.mp4 is picked file.path and file.extension are

I/flutter (13564): /data/user/0/network.challengers.challengers/cache/file_picker/2021_04_10 02:59
I/flutter (13564): 2021_04_10 02:59

Platform

  • Android
  • iOS
  • Web
  • Desktop

Platform OS version
What version did it happen?

Android 9 (3.18.120)

How are you picking?

    FilePickerResult? result = await FilePicker.platform.pickFiles(
      allowMultiple: true,
      type: FileType.custom,
      allowedExtensions: ['jpeg', 'jpg', 'png', 'mp4'],
    );

Details to reproduce the issue
If I rename a file without whitespaces, it works well.

Error Log

D/FilePickerUtils(13564): Allowed file extensions mimes: [image/jpeg, image/jpeg, image/png, video/mp4]
D/FilePickerDelegate(13564): Selected type */*
I/FilePickerUtils(13564): Caching from URI: content://com.android.providers.media.documents/document/video%3A60031
D/FilePickerUtils(13564): File loaded and cached at:/data/user/0/network.challengers.challengers/cache/file_picker/2021_04_10 02:59
D/FilePickerDelegate(13564): File path:[com.mr.flutter.plugin.filepicker.FileInfo@8c75dc4]
V/InputMethodManager(13564): checkFocus: view=io.flutter.embedding.android.FlutterView{9f41783 VFE...... .F.....D 0,0-1080,2214 #1} next=io.flutter.embedding.android.FlutterView{9f41783 VFE...... .F.....D 0,0-1080,2214 #1} forceNewFocus=true package=network.challengers.challengers
I/Timeline(13564): Timeline: Activity_idle id: android.os.BinderProxy@f9f2049 time:540983330
I/flutter (13564): /data/user/0/network.challengers.challengers/cache/file_picker/2021_04_10 02:59
I/flutter (13564): 2021_04_10 02:59

Screenshots and/or video

Flutter Version details

[✓] Flutter (Channel stable, 2.8.1, on Ubuntu 20.04.4 LTS 5.13.0-35-generic,
    locale en_US.UTF-8)
    • Flutter version 2.8.1 at /home/wiany11/.flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 77d935af4d (3 months ago), 2021-12-16 08:37:33 -0800
    • Engine revision 890a5fca2e
    • Dart version 2.15.1

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at /home/wiany11/Android/Sdk
    • Platform android-32, build-tools 32.0.0
    • Java binary at: /home/wiany11/.android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Android Studio (version 2021.1)
    • Android Studio at /home/wiany11/.android-studio
    • Flutter plugin version 63.2.2
    • Dart plugin version 211.7798
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)

[✓] Android Studio
    • Android Studio at /home/wiany11/.android-studio/
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • android-studio-dir = /home/wiany11/.android-studio/
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)

[✓] VS Code (version 1.65.1)
    • VS Code at /usr/share/code
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (2 available)
    • LM Q925L (mobile) • LMQ925L16f2814e • android-arm64  • Android 9 (API 28)
    • Chrome (web)      • chrome          • web-javascript • Google Chrome
      99.0.4844.51

• No issues found!

Additional context

@wiany11 wiany11 added the new issue An issue that hasn't yet been seen from the maintainer label Mar 13, 2022
@miguelpruivo miguelpruivo added improvement Improvement needed on a specific feature android Issue applies to Android platform and removed new issue An issue that hasn't yet been seen from the maintainer labels Mar 15, 2022
@miguelpruivo miguelpruivo self-assigned this Mar 15, 2022
@BurningAXE
Copy link

Not sure if it is caused by this problem but files with spaces in the name are not actually copied in the cache:
Screenshot 2022-03-22 at 11 44 47
This is the result from selecting the same file with only the name changed.
Should I create another issue or it will be fixed when this one is fixed?

@github-actions
Copy link

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Mar 30, 2022
@github-actions
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

@BurningAXE
Copy link

Can we reopen this because it really needs a fix!?

@BurningAXE
Copy link

@miguelpruivo Can you take a look, please?

@miguelpruivo miguelpruivo reopened this Jun 9, 2022
@github-actions github-actions bot removed the stale label Jun 10, 2022
@github-actions
Copy link

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Jun 17, 2022
@github-actions
Copy link

github-actions bot commented Jul 2, 2022

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this as completed Jul 2, 2022
@BurningAXE
Copy link

@miguelpruivo The issue is again closed due to inactivity even though the problem remains. Can we expect a fix?

@stephane-archer
Copy link
Contributor

#1628

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Issue applies to Android platform improvement Improvement needed on a specific feature stale
Projects
None yet
Development

No branches or pull requests

4 participants