I've been trying to find out what's been eating disk space and ran a query to tally up the size of different file type in my database
select sum(filesize), mimetype from mdl_files where id in ( SELECT MAX(id) AS id FROM mdl_files GROUP BY contenthash ) group by mimetype
I see some usual numbers but tens of GB's of PNG files. More than the videos on my site. Uh oh.
Digging deeper and looking at the pattern there are hundreds of thousands of PNG images with records like this:
# id, contenthash, pathnamehash, contextid, component, filearea, itemid, filepath, filename, userid, filesize, mimetype, status, source, author, license, timecreated, timemodified, sortorder, referencefileid
439234, cb80bcac1ca760d049cc7d4426f4408e46fb9e01, 34ff834448353c1952b353f8baada88b0b27b93e, 6982, assignfeedback_editpdf, pages, 13213, /, image_page0.png, , 1394221, image/png, 0, , , , 1559433918, 1559433918, 0,
439237, cb80bcac1ca760d049cc7d4426f4408e46fb9e01, a81f9338475c4a859e747ad7fe6ccb3de96e4a98, 6982, assignfeedback_editpdf, readonlypages, 13213, /, image_page0.png, , 1394221, image/png, 0, , , , 1559433918, 1559433918, 0,
A bit of poking and guessing and I think that `mod/assign/feedback/editpdf/classes/document_services.php` has some likely looking culprits (e.g.