How to delete conversion + original when deleting a media item? #2009
Unanswered
BenjaminVerkleij
asked this question in
Q&A
Replies: 2 comments
-
I'm thinking the medialibrary does delete the original item as well. Could you PR a failing test that proves that this behaviour is broken? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'll try to look into this asap. I've noticed that php artisan medialibrary:clean does remove the original when left behind on deleting the media item itself. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If you've attached a media item using a separate disk for the conversions with storingConversionsOnDisk() the original file isn't deleted from the disk when you delete said media item.
If, for example, I delete a media item with $mediaItems[0]->delete(); all conversions in the conversions_disk directory are correctly deleted but the original file in the main media disk is not deleted.
Is it possible to delete both automatically?
I'm using Media Library 8.5.0.
Beta Was this translation helpful? Give feedback.
All reactions