Hallo zusammen,
ich versuche gerade ein Backendmodul mit Extbase/Fluid zu entwickeln. Jetzt bin ich gerade dabei ein Dateiupload zu realisieren. Wenn ich nun aber mein Formular ausfülle bekomme ich immer folgende Fehlermeldung.
Es wäre ziemlich cool wenn mir jemand sagen könnte ob ich irgendwas falsch gemacht habe! :)
Problem-Fehlermeldung: An error occurred while trying to call Tx_Atohtmlexport_Controller_StaticHtmlExportController->createAction()
Validation errors for argument "newStaticHtmlExport"
newStaticHtmlExport: Validation errors for property "exportFile"
public function newAction(Tx_Atohtmlexport_Domain_Model_StaticHtmlExport $newStaticHtmlExport = NULL) { if ($newStaticHtmlExport == NULL) { // workaround for fluid bug ##5636 $newStaticHtmlExport = t3lib_div::makeInstance('Tx_Atohtmlexport_Domain_Model_StaticHtmlExport'); } $this->view->assign('newStaticHtmlExport', $newStaticHtmlExport); } public function createAction(Tx_Atohtmlexport_Domain_Model_StaticHtmlExport $newStaticHtmlExport) { //workaround für noch nicht vorhandene file upload unterstützung (http://typo3blogger.de/extbase-file-upload/) if ($_FILES['tx_atohtmlexport_StaticHtmlExport']) { $basicFileFunctions = t3lib_div::makeInstance('t3lib_basicFileFunctions'); $fileName = $basicFileFunctions->getUniqueName( $_FILES['tx_atohtmlexport_StaticHtmlExport']['name']['newStaticHtmlExport']['exportFile'], t3lib_div::getFileAbsFileName('uploads/tx_atohtmlexport/')); t3lib_div::upload_copy_move( $_FILES['tx_atohtmlexport_StaticHtmlExport']['tmp_name']['newStaticHtmlExport']['exportFile'], $fileName); } $this->staticHtmlExportRepository->add($newStaticHtmlExport); $this->flashMessageContainer->add('Your new StaticHtmlExport was created.'); $this->redirect('list'); }
<!-- Templates/StaticHtmlExport/New.html – View für newAction --> <f:render partial="FormErrors" /> <f:form enctype="multipart/form-data" method="post" controller="StaticHtmlExport" action="create" name="newStaticHtmlExport" object="{newStaticHtmlExport}"> <f:render partial="StaticHtmlExport/FormFields" /> <f:form.submit value="Create new" /> </f:form> <!-- Partials/StaticHtmlExport/FormFields.html – Partial für FormFields -->
Mit bestem Gruß
Rayphi