How to store camera image with specific name into gallery?

I want to store captured image with camera in to gallery with specifc name.
I tried using base64 data but converting base64 to blob and then writing that file to image not working.

Is there any alternative solution for that? Like having File URI from camera source and then moving or copying to gallery. Or is there any proper solution for that?