64robots / nova-image-cropper

Image Field with built-in cropper for Laravel Nova
57 stars 16 forks source link

Don't removes old image when upload a new one #20

Closed wemersonrv closed 5 years ago

wemersonrv commented 5 years ago

When edit & save a new resource, and upload/crops an image, the new uploaded image is stored fine. But the old image is not removed on store.

If user change the image, i don't understand the need to mantain the old image; so i thing the old image must be removed.

beliolfa commented 5 years ago

This field extends nova File field. So this methods are available for you.

https://nova.laravel.com/docs/2.0/resources/file-fields.html#pruning-deletion

wemersonrv commented 5 years ago

This field extends nova File field. So this methods are available for you.

https://nova.laravel.com/docs/2.0/resources/file-fields.html#pruning-deletion

It works with ->prunable()

tx