Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By NagareHoshi on
I want my module to delete all images that have been uploaded with its help and delete all database entries from 'file_managed' table on uninstall. I have no problem with the actual file deleting, but I'm stuck with database records deleting. I know there is a file_delete function that removes the database entry as well, but how is it possible to get the required fid then? Thanks in advance.
Comments
Did you tried db_delete?
Did you tried db_delete?
If you want deleted everything, just remove the condition.
https://api.drupal.org/api/drupal/includes!database!database.inc/functio...