Is there a way to add an existing file to Gallary? #128
-
Your plugin is clearer and better same plugins I have used But I finding a plugin which allow me to just add a existing file (image/video) to gallary without copy and paste to gallary I have read your code at function writeData in /main/android/src/main/java/studio/midoridesign/gal/GalPlugin.java file. It like copy and paste an existing file to gallary. It will make a file duplicated to 2, one at original path and one at new gallary path. But your plugin can do better by allow dev just tell that "add this filepath to gallary for end user can find it in Gallary app without move or copy it" If I understand wrong, please correct me. I've only been learning Flutter for a few months |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Thanks for starting the discussion @ngotandatnnst 🤝 Are you saying that you want to use Basically, when we save media in a gallery, the theory is to put the files in the "Pictures" or "Movies" directory. We could probably add them directly from the path, but if the original file is deleted for some reason, it will likely be removed from the gallery as well. That may be a unintended behavior for the developer. For example, Or We could remove the file with the path received in the argument and leave only the file to be displayed in the gallery, but I think this should be removed by the developer at any given time.
Can you give me a more detailed use case for this? We may be able to provide support. |
Beta Was this translation helpful? Give feedback.
-
Thank you for providing the detailed use case @ngotandatnnst ! I still think that even in that case, we should not directly scan the file in the received path and save it to the gallery. The downloaded files are probably stored in a cache directory, and I'm not sure when that would be deleted. Maybe it will be deleted just by restarting the app, and thereby unintentionally deleted from the gallery app as well. But it certainly makes sense to have a Thank you. |
Beta Was this translation helpful? Give feedback.
Thank you for providing the detailed use case @ngotandatnnst !
I still think that even in that case, we should not directly scan the file in the received path and save it to the gallery. The downloaded files are probably stored in a cache directory, and I'm not sure when that would be deleted. Maybe it will be deleted just by restarting the app, and thereby unintentionally deleted from the gallery app as well.
But it certainly makes sense to have a
Stream
or some other option to save large files to the gallery.Please consider submitting a "Feature request" issue after adding "Mark as answer."
Thank you.