[TYPO3-mvc] Validation Error File Upload
Sören Kracker
s.kracker at kopfstand-mail.de
Thu Sep 8 16:32:32 CEST 2011
Hello,
I always get this error when submitting a form with file upload in backend:
An error occurred while trying to call
Tx_Placeholder_Controller_CatalogController->createAction()
1245107351: Validation errors for argument "newCatalog"
newCatalog: Validation errors for property "filename"
But I haven't set any validation for the filename except NotEmpty but I
select a file, so it shouldn't be empty. Does anybody have an idea
what's going wrong? Maybe debugging hints too? I'm new to extbase/fluid.
Controller:
/**
* action create
*
* @param $newCatalog
* @return string The rendered create action
*/
public function createAction(Tx_Placeholder_Domain_Model_Catalog
$newCatalog) {
...
}
TCA:
'filename' => array(
'exclude' => 0,
'label' => 'filename',
'config' => array(
'type' => 'group',
'internal_type' => 'file',
'uploadfolder' => 'uploads/tx_placeholder',
'allowed' => '*',
'disallowed' => 'php',
'size' => 1,
),
),
Model:
/**
* filename
*
* @var string
* @validate NotEmpty
*/
protected $filename;
/**
* Returns the filename
*
* @return string $filename
*/
public function getFilename() {
return $this->filename;
}
/**
* Sets the filename
*
* @param string $filename
* @return void
*/
public function setFilename($filename) {
$this->filename = $filename;
}
More information about the TYPO3-project-typo3v4mvc
mailing list