flutter_file_picker icon indicating copy to clipboard operation
flutter_file_picker copied to clipboard

fix #1335: fix intent flag from ACTION_GET_CONTENT to ACTION_OPEN_DOCUMENT

Open muttsu-623 opened this issue 1 year ago • 9 comments

fix #1335: fix intent flag from ACTION_GET_CONTENT to ACTION_OPEN_DOCUMENT

muttsu-623 avatar Jul 30 '23 06:07 muttsu-623

@miguelpruivo Hi @miguelpruivo , I hope you're doing well! I've created a Pull Request and would love to hear your thoughts and suggestions 😄

muttsu-623 avatar Jul 31 '23 02:07 muttsu-623

Hi, what were the reason behind this change?

miguelpruivo avatar Aug 03 '23 09:08 miguelpruivo

Hi, what were the reason behind this change?

My guess would be the FilePickerResult returned from pickFiles() being null. At least this is what is happening in my case.

https://github.com/miguelpruivo/flutter_file_picker/issues/1335#issuecomment-1714659456

julian-CStack avatar Sep 11 '23 22:09 julian-CStack

ping on this

melWiss avatar Oct 05 '23 16:10 melWiss

ping on this

daviresio avatar Oct 16 '23 17:10 daviresio

@miguelpruivo Is there any problem?

muttsu-623 avatar Oct 26 '23 00:10 muttsu-623

I'm afraid to merge this change because I believe it could introduce breaking changes for a lot of users. I don't see a lot of traction on this issue, and if this was the case (for most) that would mean that a lot of devs would be pinging on this.

On the other hand, I'm not sure if changing to OPEN_DOCUMENT will introduce more issues than solve, because we are actually getting (GET_CONTENT) here to get the raw files, not opening. The OPEN_DOCUMENT is more intended to launch the file, rather than manipulating its data from what I understood.

miguelpruivo avatar Oct 31 '23 12:10 miguelpruivo

@miguelpruivo what about making this optional, to use Intent.ACTION_OPEN_DOCUMENT or Intent.ACTION_GET_CONTENT?

BitBlueDevStudio avatar Nov 12 '23 22:11 BitBlueDevStudio

This PR seems to introduce changes similar to #1380 so I'll mention it here too: it seems that this change breaks file picker on some older Android versions, at least on Android 9. https://github.com/miguelpruivo/flutter_file_picker/pull/1380#discussion_r1485321475

dmitrio95 avatar Feb 10 '24 22:02 dmitrio95

Dup of #1380.

miguelpruivo avatar Mar 20 '24 10:03 miguelpruivo

@miguelpruivo, this doesn't seem to be a duplicate of #1380: #1380 has more changes. Are they consequential?

We have had to use muttsu-623's flutter_file_picker for Android because of this issue, but muttsu-623's fork has Windows issues. So today I forked this and made cypherstack/flutter_file_picker which is your 8.0.3 + muttsu-623's single change: https://github.com/muttsu-623/flutter_file_picker/commit/f0930d9fa79d347b2a0e25a7de4f5a4a88a9a907

This PR should be merged. Does it need changes?

sneurlax avatar Jun 04 '24 03:06 sneurlax