-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Per Collection Media Folder , Images Not Deleted When Post Is Deleted #4069
Comments
Closing this as duplicate of #3615 There are no events yet on deletion yet and probably it's better just to fix the bug. |
Sorry, my mistake here. There are However, you'd need to read the access token from local storage and use the git service API to inside the event handler to delete those files. |
lets say i get the access token in local staroge , how would that help me make git hub api call? Im just using the cms in local, yeah im using netlify-cms-proxy, so I dont need github api call... |
The token from The way the CMS deletes files is not exposed as an API, so the quick and dirty way is described above |
hi can you give an example how to achieve this, i really wanna implement removing the images there is a deleteMedia commit type , the available template tags are path, author-login, author-name
what are the available method with entry? im thinking if there is set and get, would there be also delete? |
Ive read the code , there is no deleteFolder only deleteFiles... This is ok on normal set up , but if you manage per folder page collection... then this wont really work, there are artifacts left like images, and the folder itself... I mean i can add to path all the images , since i can get it in resources key but thats it, i still have an artifacts left an empty folder which should be delete... I wish there is an easier solution to this by adding deleteFolder when |
Per Collection Media Folder Always leave the Images Not Deleted...
Therefore It Remained in the Folder and only the index.md is deleted when you delete a post entry.
My Config
Is there a possibility to use the CMS EVENTS ?
is there a onDelete event where in you can ask specify to delete also the folder and the image
The text was updated successfully, but these errors were encountered: