Closed ngotandatnnst closed 1 year ago
In addition, if donwloading file isn't too large, that feature still make our code shorter and clearer. So, our code are not errorprone
Thank you for submitting the issue ! @ngotandatnnst π€.
I have researched the native APIs swift photo-kit
and android MediaStore
and could not find a way to implement this feature.
For photo-kit
, We need to specify the local URL of the file,
https://github.com/natsuk4ze/gal/blob/0f3155f2dba7428ab75ed2d009b3cf16713d64f6/ios/Classes/GalPlugin.swift#L61
For MediaStore
, saving directly to the "Pictures" or "Movies" directory, which is the destination for gallery, has been deprecated since Android 10.
https://github.com/natsuk4ze/gal/blob/0f3155f2dba7428ab75ed2d009b3cf16713d64f6/android/src/main/java/studio/midoridesign/gal/GalPlugin.java#L158
Are there other packages that implement this feature?
Apart from that, there is a good package called ffmpeg_kit_flutter as a general optimization approach for large videos. It allows you to convert videos to higher compression video codecs and file formats, split videos, and more.
I hope this helps π
I don't know that is not allowed by native APIs. Thanks for spending time and for usefull infomation.
In fact, I am finding a package allow me to do that feature but hasn't found yet (now I know it's not allowed by native APIs π ). I just changed using packages like image_gallery_saver and saver_gallery to your Gal package because your Gal packge is clearer, up to date, and your support is extremely greate base on reply time and useful infomation
Hope you keep going this awesome package and create more usefull packages
I am sorry @ngotandatnnst. But your message helps me to maintain this package ! Thank you π
Proposal
As we discuss at https://github.com/natsuk4ze/gal/discussions/128, sometime we need to push directly incoming bytes stream to a file in gallery
For example:
Use case
If the file is large, it take more phone's resource to
Resource for proccessing that flow is too expensive if the downloading file is large. So, we need somehow to push incoming bytes stream to a file in gallery. And then the flow is just simple like