-
I'm creating a simple blog post using the documentation from these pages:
And here's my final form (slightly modified, using When I uploaded a feature icon ( But when I deleted the post, only the attachment file ( The
And the
My question:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Nevermind, I can delete uploaded
And adding this code on delete function (FeatureEditScreen):
As for the second question I haven't found an simple way yet. |
Beta Was this translation helpful? Give feedback.
-
After testing it for few days, I realized that the image and attachment system will calculate file hash to check if a file already exist on the server or not. In my case, it seems that the file (from a removed post) is still used by another post on my blog so it wasn't deleted automatically. Using above solution by me will delete the image, making all other posts who require the same image broken. TLDR: Image and attachment will only be deleted if no other components use it. Marking this question as answered. |
Beta Was this translation helpful? Give feedback.
After testing it for few days, I realized that the image and attachment system will calculate file hash to check if a file already exist on the server or not. In my case, it seems that the file (from a removed post) is still used by another post on my blog so it wasn't deleted automatically. Using above solution by me will delete the image, making all other posts who require the same image broken.
TLDR: Image and attachment will only be deleted if no other components use it.
Marking this question as answered.