Score:-2

Deleting a File from Website

eg flag

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.

Score:1
cn flag

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.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.