Flutter_file_picker: [Feature] Support picking folders

Created on 10 Apr 2020  路  7Comments  路  Source: miguelpruivo/flutter_file_picker

Self explanatory. Although this might only be possible on Android.

feature

Most helpful comment

@gitboss yes, it is, expect it for this week.

All 7 comments

I think it's also possible on iOS and would allow to download a file and save it to the user's picked folder, without any permission needed

@Nico04 let me know if you can reproduce a use case for this on iOS as I wasn't able to achieve so.

not sure what the problem is, but if I understand it correctly, you can simply use the document picker with file type folder: https://github.com/hpoul/file_picker_writable/blob/e797b3e0568133622ec5a0a59b84ec480515e8e3/ios/Classes/SwiftFilePickerWritablePlugin.swift#L157

seems to work for me so far.

2020-05-26 19-19-47 2020-05-26 19_21_11

@hpoul pro tip! Didn't know that. That makes it quite easier to add this on file_picker. I'll do so then. Thank you!

@hpoul pro tip! Didn't know that. That makes it quite easier to add this on file_picker. I'll do so then. Thank you!

@miguelpruivo Thank you for file_picker. Is picking folders feature being implemented?

@gitboss yes, it is, expect it for this week.

As promised, directory picking is now supported on 1.10.0 with getDirectoryPath(). 馃帀

Some side notes:

  • On Android this will only work on SDK 21 or above. You can still use the plugin with older versions, but getDirectoryPath() won't simply work and throw an error.
  • On iOS you'll need iOS 11 or above (TBC) but you already had to have iOS 11 or above in order to pick documents anyway.
  • Go-flutter isn't yet supported for directory picks.
  • I hadn't the time to exhaustive test it, specially on Android where the path handling is really a pain and you are forced to use some "hacks" to get absolute paths, which makes sense, because they don't want you to (see #234 for scoped storage proposal).

With all that said, just let me know if you experience any issue related to it and fill a new issue.

Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

creativecreatorormaybenot picture creativecreatorormaybenot  路  6Comments

ened picture ened  路  7Comments

Ghxst picture Ghxst  路  6Comments

ElaineSchwner picture ElaineSchwner  路  4Comments

bkoznov picture bkoznov  路  5Comments