bauerj / paperless_app

An Android/iOS app for Paperless
https://play.google.com/store/apps/details?id=eu.bauerj.paperless_app
GNU General Public License v3.0
527 stars 46 forks source link

Ios sharing intent #92

Closed CTimmermann closed 2 years ago

CTimmermann commented 2 years ago

Closes #76

CTimmermann commented 2 years ago

Quick explanation for the changed line in _DocumentRouteState.uploadSharedDocument():

This is a workaround for some faulty behavior of the receive_sharing_intent plugin.

Without the Uri.decodeFull(), filenames including spaces or German "Umlaute" cause errors (see https://github.com/KasemJaffer/receive_sharing_intent/issues/97).

The replaceAll('file://', '') is necessary due to the behavior discussed here: https://stackoverflow.com/questions/72767865/flutter-receive-sharing-intent-share-pdf-with-ios

bauerj commented 2 years ago

Thank you! I'll merge this into the ios branch for now, as I assume it's not ready for production yet.

bauerj commented 2 years ago

I'll also have to test whether the file sharing still works in Android with your replaceAll('file://', '') change. Otherwise we'll have to make that one conditional on OS.