Source for file LMediaManagerWebUpload.php
Documentation is available at LMediaManagerWebUpload.php
* @license http://opensource.org/licenses/mozilla1.1.php Mozilla Public License
* @copyright 2005, diemeisterei GmbH. All rights reserved.
* @author $Author: schmunk $
* @version $Revision: 246 $ $Date: 2006-06-01 15:11:24 +0000 (Do, 01 Jun 2006) $
* @package Phundament.Packages
* @subpackage LMediaManager
* Provides A Web Upload Component for LMediaManager
* @package System.Web.UI.WebControls
$this->setViewState("category", $value, null);
return $this->getViewState("category", null);
public function onInit($param)
$this->Uploader->OnFileUpload[]= array (
$this->raiseEvent('OnUploadSucceeded', $this, $param);
private function handleUpload($name, $tmpname, $overwrite= false)
$MP= $this->Application->getParameters()->itemAt("UploadPath");
// check for existing file
$c->addAnd(LMediaManagerFilesPeer::MD5, $md5);
if (!unlink($MP . "/" . $name))
$res= $this->handleUpload($sender->FileName, $sender->LocalName, $this->OverwriteSelector->getChecked());
$str= "Upload succesful.";
//$this->Service->reload();
$str = "Directory is not writeable!";
$str= "Upload Folder is not writable!";
$str= "Can not delete exisiting file!";
$str= "Error while moving uploaded file!";
$str= "File was not uploaded! Same file already exists in database.";
$this->UploadResult->Controls[]= "$res: " . $str;
$um = $this->Application->getModule("user_message");
if ($um !== null) $um->add($str,1);
|