Describe the issue or problem
When removing a galley, should the submission_files associated with the galley be deleted? Not deleting the files is a problem, especially in terms of available server space, for installations that contract with an external web service provider.
What application are you using?
OJS 3.4.0-8
Additional information
Files remain on the server without being deleted.
Good afternoon Roger,
I am testing a clean version of OJS 3408, and I have found that the files associated with a galley are not deleted, when I think they should be. I wonder if the function Repo::galley()->delete($galley) in /lib/pkp/classes/Repository.php lines: 190-207 is OK.
This is as written:
// Delete related submission files
$submissionFiles = Repo::submissionFile()
->getCollector()
->filterByAssoc(Application::ASSOC_TYPE_GALLEY)
->filterByFileIds([$galley->getId()])
->getMany();
And, what I’m wondering is if it shouldn’t be this other:
// Delete related submission files
$submissionFiles = Repo::submissionFile()
->getCollector() ->filterByAssoc(Application::ASSOC_TYPE_GALLEY,[$galley->getId()])
->getMany();
I’ve tested it with that change and now it has indeed deleted the files from the server, including all dependencies and revisions if any