-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
DEV backlog
Right now, when you download an H5P package, the contents are extracted and "installed" in their own spaces, but we keep the zip file in the file system. When we calculate the space used by an activity, we calculate the size of the zip file and that's it because that's the file "linked" to the activity.
When deleting the files related to an activity, we delete the zip file and this deletes the package content folder (in CoreH5PPluginFileHandlerService->fileDeleted).
IMO it would be better to delete the zip file after deploying it, and when calculating the size of the activity we should calculate the size of the content folder (and ignore the libraries folders because they are shared for the whole site). Deleting the files of the activity should delete the content folder directly instead of deleting the zip file.
This will also allow us to delete the zip file if a deploy fails (e.g. because it has missing dependencies). Right now it's not done because you could be updating an existing H5P package, and deleting the zip if it fails could delete an existing content folder.