Hallo,
ich möchte in meiner Extension die Möglichkeit bereitstellen Dateien hochzuladen. Leider funktioniert es nicht. Hat jemand eine Idee, woran das liegen könnte?
Hier der PHP-Code:
function uploadPic($template, $myXajaxRequest=''){
global $TYPO3_CONF_VARS;
// Fileupload
$uploadfile = $TYPO3_CONF_VARS['BE']['fileadminDir'].$_FILES['userfile']['name'];
move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile);
return $this->cObj->substituteMarkerArrayCached($template['picture_upload'], $markerArray);
}
Hier der HTML-Code:
<form name="tx_commercelisting_content_left_form" id="tx_commercelisting_content_left_form" action="/produkt.html?&article=3" enctype="multipart/form-data" method="post">
<table cellpadding="0" cellspacing="0">
<tr class="tx_commercelisting_upload_pic">
<td id="picture_upload_img"></td>
</tr>
<tr class="tx_commercelisting_upload_pic">
<td>
<input type="file" name="file" onchange="" />
<input type="hidden" name="MAX_FILE_SIZE" value="500000" />
<div>
<input type="checkbox" id="tx_commercelisting_upload_checkbox" />
<label for="tx_commercelisting_upload_checkbox" onclick="">Ich versichere, dass ich dieses Foto hochladen darf...</label>
</div>
<input type="submit" name="submit" value="hochladen" />
</td>
</tr>
</table>
</form>
Vielen Dank für eure Antworten!