Rewrote Special:Upload to allow easier extension. Mostly backwards compatible towards...
[lhc/web/wiklou.git] / includes / upload / UploadFromStash.php
index 6fbeb51..cb5926f 100644 (file)
@@ -41,6 +41,7 @@ class UploadFromStash extends UploadBase {
                                false
                        );
 
+                       $this->mVirtualTempPath = $sessionData['mTempPath'];
                        $this->mFileProps = $sessionData['mFileProps'];
        }
 
@@ -68,4 +69,14 @@ class UploadFromStash extends UploadBase {
                return array();
        }
 
+       /**
+        * Remove a temporarily kept file stashed by saveTempUploadedFile().
+        * @return success
+        */
+       public function unsaveUploadedFile() {
+               $repo = RepoGroup::singleton()->getLocalRepo();
+               $success = $repo->freeTemp( $this->mVirtualTempPath );
+               return $success;
+       }
+
 }
\ No newline at end of file