jachzen / cunning_document_scanner

MIT License
74 stars 85 forks source link

Document image gets saved to Gallery as well #13

Closed ktkk closed 12 months ago

ktkk commented 1 year ago

Hi.

First of all, thanks for this plugin. It's as simple as it needs to be!

However, I've noticed that the paths returned by getPictures() are not the only location that the images are stored. I'm assuming that when the plugin calls the platform native document scanner, it needs to call the image picker first, which will inevitably store the image in the device's Gallery.

This is not what I want, because the documents my users are scanning are confidential and contain sensitive data. I wouldn't want my users to access these images in their Gallery and have the opportunity to send them around.

I've noticed this behaviour only on Android. The images don't appear in the Gallery on iOS.

Any ideas on how I could prevent the image from being saved to the Gallery?

Kind regards.

CodeRedDev commented 1 year ago

The file's path is set by the Android dependency com.websitebeaver:documentscanner to getExternalFilesDir(Environment.DIRECTORY_PICTURES). It could probably be copied to a more appropriate location inside of this package's Android plugin.

vicajilau commented 12 months ago

As you can see, this incident does not apply to version 1.1.4. Thank you so much for using cunning_document_scanner.

Screen_recording_20231112_165030.webm