flutter_file_picker icon indicating copy to clipboard operation
flutter_file_picker copied to clipboard

Allow cancelling operation when FilePickerStatus is 'picking'. Useful when picking large cloud files

Open vinith opened this issue 3 years ago • 13 comments

There doesn't seem to be a way to cancel the operation when user picks large cloud files. It would be nice to have the ability to cancel the operation so user can pick files again.

Right now you get

I/flutter (24311): [MethodChannelFilePicker] Platform exception: PlatformException(already_active, File picker is already active, null, null) when attempting to pick files when the operation is not cancelled and still active.

vinith avatar Aug 02 '21 10:08 vinith

Are you experiencing this on Android or iOS?

miguelpruivo avatar Aug 10 '21 15:08 miguelpruivo

Android

vinith avatar Aug 20 '21 10:08 vinith

Have you managed to fix it?

miguelpruivo avatar Aug 30 '21 19:08 miguelpruivo

This isn't a priority for me. I am just building something for fun. It felt like an important feature to have so I suggested it.

vinith avatar Oct 04 '21 04:10 vinith

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

github-actions[bot] avatar Nov 11 '21 01:11 github-actions[bot]

I also need a way to cancel/destroy/restart File picker. I the user gets a large file from the cloud, it can take long. So I give him the option to cancel. The problem is that if he tries to upload another file we get the exception already_active, until the previous file is downloaded from the cloud. Is there a way to restart picker or cancel previous busy one?

aris-1 avatar Nov 23 '21 09:11 aris-1

@aris-1 currently there isn’t. But it could make sense to add.

miguelpruivo avatar Nov 23 '21 10:11 miguelpruivo

@miguelpruivo Is there any update on this issue?

Kashifalaliwala avatar Jun 27 '22 06:06 Kashifalaliwala

this feature should definitely be added , is there any updates on how to achieve canceling the operation ?

ItsYasser avatar Feb 17 '23 18:02 ItsYasser

I faced same issue. need to close existing instance. Cloud video was not downloaded and now I cannot re-download it. error : Unhandled Exception: PlatformException(already_active, File picker is already active, null, null)

riyan-dcosta avatar May 04 '23 12:05 riyan-dcosta

I am also facing the issue, hopefully it can be fixed

BrianMwas avatar Aug 10 '23 09:08 BrianMwas

I also ran into this problem. In addition, on android < 33, the picker does not open after requesting permissions to access the storage and calling FilePicker.platform.pickFiles() again leads to the mentioned error. The possibility of canceling the task could solve this problem.

Pluxury avatar Feb 08 '24 10:02 Pluxury