I'm trying to understand exactly what purpose the active and working areas serve in this module. Anybody who can shed light on this will be thanked.

Comments

ccourtne’s picture

Working area is used to store files during node creation / editing. When you add a file to a repository it is added in the working area and state. Now when the node is submitted the file is moved to the active area. This allows the admin/system to know which files can be safely deleted if the user never clicks submit.

In addition when a user is editing a node you do not want to overwrite existing files with updated copies until the user clicks submit. So when a file is being updated you upload a working copy and onlyl overwrite the active copy once the user clicks submit.

There is a function which is purge working that walks through the current wokring files and deletes anything that is older than a specfied age (configured through the settings page). This prevents a huge build up of "orphaned" files tieing up precious disk space (as opposed to the stock upload module which relies on PHP sessions ending which may take a long time to happen if you have remember me turned on and the user does not click log out).

Hope this helps the understanding of why an active/and working area is needed.

robertdouglass’s picture

Thanks! One can gather as much from reading the code but sometimes it helps to hear it in plain English. Appreciate it.

robertdouglass’s picture

Status: Active » Closed (fixed)