I host my municipality's website (lionsbay.ca) through Drupal. On this website, residents can find council minutes and agendas. Upon request of a resident, she would like her information removed from a past agenda file that was posted in 2021, however, I cannot seem to delete the file through the website. I've tried tracing the file path but I cannot seem to find the direct source of the file's location. My guess is that the file is stored on a repository somewhere. Any help would be appreciated. Thanks in advance.
1 Answer
Files are generally attached to entities (nodes, webforms, etc.) So you need to find where the file is being used and delete that entity or remove the reference to the file.
If you're using core's Media to handle the files, you can use the Entity Usage module to determine where the files are referenced. If you're using a standard File field, you'll need to do the search on your own. (I would start by looking in the database in the Files table if you didn't have any other clues.)
Also, very important for issues where you are legally required to delete files, Drupal will not delete unused files by default. So you will need to use something like the File Delete module to search your system for unused files and remove them.
All of this assumes that the file upload was through Drupal; if you're using Google Forms or something to collect the files, the file won't be in Drupal and will be in whatever system you used to collect it.