hnvn / flutter_image_cropper

A Flutter plugin for Android and iOS supports cropping images
969 stars 375 forks source link

Keep the same file base name for cropped file #484

Open javaone199 opened 2 weeks ago

javaone199 commented 2 weeks 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