Whenever the file upload URL endpoint is accessed, it creates an entry in the File table for that file. As this generally happens prior to the creation of a ContentNode or AssessmentItem associated with this file, if no ContentNode or AssessmentItem are created, then this can leave a File object that is not attached to any specific object.
This has been exacerbated by the recent usage of the same endpoint by ricecooker to avoid doing file uploads via the Studio app server.
To resolve this, we should add cleanup of File objects to the garbage collection utilities.
Acceptance criteria:
Whenever the file upload URL endpoint is accessed, it creates an entry in the File table for that file. As this generally happens prior to the creation of a ContentNode or AssessmentItem associated with this file, if no ContentNode or AssessmentItem are created, then this can leave a File object that is not attached to any specific object.
This has been exacerbated by the recent usage of the same endpoint by ricecooker to avoid doing file uploads via the Studio app server.
To resolve this, we should add cleanup of File objects to the garbage collection utilities.
Acceptance criteria:
ContentNodeAssessementItemorSlideShow- it is vital that only files for which these three are allnullshould be deleted.