alexrintt / shared-storage

Flutter plugin to work with Android external storage.
http://alexrintt.io/shared-storage/
MIT License
54 stars 26 forks source link

createFile fails on network content providers #151

Open Demizo opened 8 months ago

Demizo commented 8 months ago

First off, thank you for the awesome plugin! Describe the bug Operations that require network calls (i.e. createFile on an external content provider) fail due to Android blocking network calls on the main thread. (If curious see https://github.com/nextcloud/android/issues/8028).

To Reproduce Attempt to create a file on an external network content provider.

Expected behavior Files can be created on network content providers.

Smartphone (please complete the following information):

Additional context I was able to quickly fix the problem on a fork of the plugin by running the API actions in the IO thread (https://github.com/Demizo/shared-storage/commit/636c9e33652da5d3a592dfeca30250ffb81c9d3a)