gal icon indicating copy to clipboard operation
gal copied to clipboard

File name and return the new path

Open dryasbk opened this issue 1 year ago • 6 comments

Did you check the documentation and it did not help?

Proposal

1- It would be very nice to add option to add new name for the image/ video. 2- Return the new path of the saved media in it is album.

Use case

I am trying to save video from camera or pick it from gallery and save them in a special album for my app and save link in local database for easy back up of data, so just to copy exported database and the folder of media.

dryasbk avatar Aug 16 '24 00:08 dryasbk

1- It would be very nice to add option to add new name for the image/ video.

The putImage and putImageBytes already allow names to be specified. @dryasbk

natsuk4ze avatar Aug 16 '24 00:08 natsuk4ze

1- It would be very nice to add option to add new name for the image/ video.

The putImage and putImageBytes already allow names to be specified. @dryasbk

The document and code did't have a file name parameter of putImage function

hoangcongtuan avatar Aug 19 '24 13:08 hoangcongtuan

You can create the file name as you like and simply pass the path to "putImage". We do not plan to add the ability to rename existing files to this plugin.

natsuk4ze avatar Aug 19 '24 13:08 natsuk4ze

Returning the Saved path I think is mandatory. for example, After saving, I want to preview the saved video. So without knowing the path, it is not possible.

Riz1ahmed avatar Sep 25 '24 03:09 Riz1ahmed

Returning the Saved path I think is mandatory

No. The file should exist locally at the time saveVideo is used. If so, simply specify the path to the file.

natsuk4ze avatar Sep 25 '24 04:09 natsuk4ze

And here is why I am reluctant to work on returning file path.

  • There are other ways to achieve the use case
  • In order to get a pass on iOS, I would need full access to all photos, not just write permissions
  • On iOS, getting the path to a file and manipulating it directly is deprecated
  • The path can be changed by the user or the system without the app's intention -> it only can be used as a temporary file path, so if that is the case, the path of a file already stored locally is sufficient

natsuk4ze avatar Sep 25 '24 04:09 natsuk4ze

This request comes in frequently, but I have never seen the correct use case. Once we do, we put it in the Close and then in the FAQ, and reopen this again if necessary.

natsuk4ze avatar Nov 09 '24 05:11 natsuk4ze

https://github.com/natsuk4ze/gal/discussions/224

natsuk4ze avatar Nov 09 '24 05:11 natsuk4ze