File not deleted when deleting a Download

Viewing 4 posts - 1 through 4 (of 4 total)
#208412

Marco Houtgraaf
Participant

I have written a plugin that replaces the WordPress search. Now it will index PDF titles and content.
I found that if you delete a PDF download with Download Manager, the entry is deleted, however the PDF file remains in the folder /wp-content/uploads/download-manager-files. You have to delete these manually. If not, when re-indexing with my plugin, the file will still show up in the search results. 
Am i right in believing that when deletng a download, the file is still in the folder /wp-content/uploads/download-manager-files, and if so, could you make moving a Download to Trash, it also deletes the actual file?

#208413

Tahasin
Moderator
This reply has been marked as private.
#208414

Marco Houtgraaf
Participant

Excellent. Resolved!!
Added it to my functions.php in my child theme. Now you can delete a package. It is then sent to the Trash.
Note: after you empty the trash, the file is gone from the /wp-content/uploads/download-manager-files.
Great job guys! Thanks

#208415

Tahasin
Moderator

Glad to hear that, it worked.
If you found my support helpful, I’d truly appreciate a moment of your time to leave a 5-star review [here], your feedback means a lot to us and helps us keep doing what we love!

Thank you!!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.