How to delete picture without all the folders #3370
Unanswered
florianvieira
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have a list with staff, when i put all my images in the same folder "staff-pictures" :
But when I edit staff item and I upload new image, I run "$staff->clearMediaCollection('images');" for delete picture but this function delete all pictures of staff in folder "staff-pictures". And the problem is the same if I would like to delete one staff "$staff->delete()"...
How can I make it delete only the image in question from the staff?
(All the primary keys in my project are UUIDs, so I've already modified the "media" migration to replace the "model_id" with a uuid type)
Thanks !
Beta Was this translation helpful? Give feedback.
All reactions