---
title: "Fileupload"
url: "https://www.typo3.net/d/78316-fileupload"
source: "typo3.net"
tags: ["Extensions","Entwicklung","Frage"]
created: "2008-06-11"
last_reply: "2008-06-11"
replies: 0
solved: false
page: 1
pages: 1
lang: "de"
---

# Fileupload

Extensions › Entwicklung · 0 Antworten · gestartet 2008-06-11

## Eröffnungsbeitrag

**king_pagel** · 2008-06-11 · [Beitrag #1](https://www.typo3.net/d/78316-fileupload/1)

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:

```php
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:

```php
<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!

---

Quelle: „Fileupload“, typo3.net, https://www.typo3.net/d/78316-fileupload
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
