Moodle

Implement expiry of draft files

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: Files API
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

I was testing the cleanup of files by creating a resource and deleting it, and I noticed that the content is never moved into the trash because the draft files remain there:

nsmoodle20=> select id, component, filearea, filename from mdl_files where contenthash = '82d8b776feed71754344544602107247ece6794e';
id | component | filearea | filename
--------------------+----------
51 | user | draft | test1.txt
55 | user | draft | test2.txt
(2 rows)

There is a comment in the file_storage::cron function that this is still left to do.

//TODO: find out all stale draft areas (older than 1 day) and purge them
// those are identified by time stamp of the /. root dir

I couldn't see an issue in the tracker, so here is one for you, just as a reminder!

Cheers
Ash

Activity

Hide
Petr Škoda (skodak) added a comment -

Right, I have forgotten this TODO exists, thanks!

Petr Skoda

Show
Petr Škoda (skodak) added a comment - Right, I have forgotten this TODO exists, thanks! Petr Skoda

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: