hnvn / flutter_image_cropper

A Flutter plugin for Android and iOS supports cropping images
1k stars 392 forks source link

Keep the same file base name for cropped file #484

Open javaone199 opened 6 months ago

javaone199 commented 6 months ago

Keep the same file name for croppedFile.

For example, /path/employee/john-20240301.jpg. Its cropped file name would be like "image-cropper-12345678.jpg".

The cropped file base name should be the same: john-20240301. The file extension can be changed. When the file (photo) is uploaded, the file name is meaningful on server side. Employee photo file names are stored in database.

File rename and copy is workaround, but it can fail and also has performance overhead. It is not necessary if cropper has an option to keep the same base name.

Option: bool keepBaseName = true

Gaurav-CareMonitor commented 2 weeks ago

Yes this will be really helpful, @javaone199 can you please create a PR for the same