User:Bryan/Stashed upload meta data storage

Currently meta data for stashed (temporary) uploads (those that show warnings) is stored within the $_SESSION superglobal. This means that it is very hard to keep track of those stashed uploads. Moreover, when the session expires, the meta data is lost, whereas the files themselves linger on the filesystem eternally.

All this data should be stored in the database.

Nice features that this may enable

 * First upload, then edit (workflow change)
 * Mass upload (with only minor changes)

Requirements

 * Timestamp/expiry
 * Arbitrary meta data storage (for example download progress for async downloads)
 * Easy future implementation for thumbnailing

Implementation

 * LocalRepo::getUploadStash: Return an object to temporary store files
 * class TemporaryUpload extends UnregisteredLocalFile: File stored in the repo's temp zone
 * class UploadStash: Object to access stashed uploads
 * UploadBase::stashSession: Should call the storeFile routine of the upload stash instead of accessing $_SESSSION

Code: Unfinished, not yet working.